Package 

Class ArrayUtils

    • Method Summary

      Modifier and Type Method Description
      static <T> Array<T> add(Array<T> array, Class<T> componentType, T element) Adds a specific element to a specific array with a specific componenttype if the array does not contain the element yet.
      static <T> Array<T> insert(T element, Array<T> array, Class<T> componentType) Inserts the given element into an open (null) slot in the array if thereis one, otherwise creates a new array and adds all existing elementsand the given element
      static <T> Array<T> concat(Array<T> first, Array<T> second) Concatenates two arrays.
      static <T> boolean isNullOrEmpty(Array<T> array) Tests whether the array passed in as an argument is null or empty.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • add

         static <T> Array<T> add(Array<T> array, Class<T> componentType, T element)

        Adds a specific element to a specific array with a specific componenttype if the array does not contain the element yet.

        Parameters:
        array - the array to add element to
        componentType - the component type of array
        element - the element to add to array
      • insert

         static <T> Array<T> insert(T element, Array<T> array, Class<T> componentType)

        Inserts the given element into an open (null) slot in the array if thereis one, otherwise creates a new array and adds all existing elementsand the given element

        Parameters:
        element - the element to add
        array - the array to add to, if possible
        componentType - the class type of the array (used if a new oneneeds to be allocated)
      • isNullOrEmpty

         static <T> boolean isNullOrEmpty(Array<T> array)

        Tests whether the array passed in as an argument is null or empty.