Class BulkArrayConverter

java.lang.Object
com.appiancorp.suiteapi.common.BulkArrayConverter

public class BulkArrayConverter extends Object
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    void
    Clears the state of converter so it can used for new array conversions.
    boolean
    Returns whether the converter has been initialized.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BulkArrayConverter

      public BulkArrayConverter()
  • Method Details

    • multiplesToBulk

      public 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. 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

      public Object bulkToMultiples(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.
      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:
      true if the converter object is initialized, otherwise false
    • clear

      public void clear()
      Clears the state of converter so it can used for new array conversions.