Package com.appiancorp.suiteapi.common
Class BulkArrayConverter
java.lang.Object
com.appiancorp.suiteapi.common.BulkArrayConverter
Utility class used to combine an array of array into a single array of
combined length and vice versa. For example, if you have a three dimensional
array
then the
multiplesToBulk(java.lang.Object[]) will return an two dimensional array.
Similarly if you pass a two dimensional array to bulkToMultiples(java.lang.Object[]) you
will get back a three dimensional array.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbulkToMultiples(Object[] bulk_) This method takes an array object and return parallel arrays, from which the passed array was originally created. eg: if you pass a two dimensional array then the method will return an three dimensional array.voidclear()Clears the state of converter so it can used for new array conversions.booleanReturns whether the converter has been initialized.Object[]multiplesToBulk(Object[] multiples_) This method takes an array of array and converts into a single array of length of combined array's. eg: if you have a three dimensional array then the method will return an two dimensional array.
-
Constructor Details
-
BulkArrayConverter
public BulkArrayConverter()
-
-
Method Details
-
multiplesToBulk
This method takes an array of array and converts into a single array of length of combined array's. eg: if you have a three dimensional array then the method will return an two dimensional array. The passed in array's can be of mixed type.- Parameters:
multiples_- array's to be converted to bulk array.- Returns:
- Object array of combined length of passed in array's
-
bulkToMultiples
This method takes an array object and return parallel arrays, from which the passed array was originally created. eg: if you pass a two dimensional array then the method will return an three dimensional array.- Parameters:
bulk_- array to split into parallel arrays. This can be array of mixed types, if the original array's were of mixed type.- Returns:
- an object of type array of array.
-
isInitialized
public boolean isInitialized()Returns whether the converter has been initialized.- Returns:
trueif the converter object is initialized, otherwisefalse
-
clear
public void clear()Clears the state of converter so it can used for new array conversions.
-