Class ArrayUtil

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    @Deprecated(since="2021-05-27")
    public class ArrayUtil
    extends java.lang.Object
    implements java.lang.Cloneable, java.io.Serializable
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
    Utility methods for Array manipulation
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ArrayUtil()
      Deprecated.
       
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static <T> T[] add​(T[] array1, T[] array2)
      Deprecated.
      Add arrays
      static <T> T[] addToArray​(T[] array, T item, java.lang.Class<?> type)
      Deprecated.
      Add element to an array
      static <E> java.util.List<E> asMutableList​(E[] array)
      Deprecated.
       
      static <T> T[] prependToArray​(T item, T[] array, java.lang.Class<?> type)
      Deprecated.
      Add element to the start of an array
      static <T> T[] removeFromArray​(T[] array, java.lang.Object item)
      Deprecated.
       
      static <T> T[] removeNulls​(T[] array)
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ArrayUtil

        public ArrayUtil()
        Deprecated.
    • Method Detail

      • removeFromArray

        public static <T> T[] removeFromArray​(T[] array,
                                              java.lang.Object item)
        Deprecated.
      • add

        public static <T> T[] add​(T[] array1,
                                  T[] array2)
        Deprecated.
        Add arrays
        Type Parameters:
        T - the array entry type
        Parameters:
        array1 - An array to add to (or null)
        array2 - An array to add to (or null)
        Returns:
        new array with contents of both arrays, or null if both arrays are null
      • addToArray

        public static <T> T[] addToArray​(T[] array,
                                         T item,
                                         java.lang.Class<?> type)
        Deprecated.
        Add element to an array
        Type Parameters:
        T - the array entry type
        Parameters:
        array - The array to add to (or null)
        item - The item to add
        type - The type of the array (in case of null array)
        Returns:
        new array with contents of array plus item
      • prependToArray

        public static <T> T[] prependToArray​(T item,
                                             T[] array,
                                             java.lang.Class<?> type)
        Deprecated.
        Add element to the start of an array
        Type Parameters:
        T - the array entry type
        Parameters:
        array - The array to add to (or null)
        item - The item to add
        type - The type of the array (in case of null array)
        Returns:
        new array with contents of array plus item
      • asMutableList

        public static <E> java.util.List<E> asMutableList​(E[] array)
        Deprecated.
        Type Parameters:
        E - the array entry type
        Parameters:
        array - Any array of object
        Returns:
        A new modifiable list initialised with the elements from array.
      • removeNulls

        public static <T> T[] removeNulls​(T[] array)
        Deprecated.