Class ArrayUtils


  • public class ArrayUtils
    extends Object
    • Method Detail

      • filter

        public static <T> T[] filter​(T[] array,
                                     Predicate<T> predicate,
                                     Class<? extends T> theClass)
      • toString

        public static String toString​(Object array)

        Outputs an array as a String, treating null as an empty array.

        Multi-dimensional arrays are handled correctly, including multi-dimensional primitive arrays.

        The format is that of Java source code, for example {a,b}.

        Parameters:
        array - the array to get a toString for, may be null
        Returns:
        a String representation of the array, '{}' if null array input