Class ArrayUtils

java.lang.Object
org.rspeer.commons.ArrayUtils

public class ArrayUtils extends Object
Provides utilities for arrays
  • Constructor Details

    • ArrayUtils

      public ArrayUtils()
  • Method Details

    • asModifiableList

      public static <T> List<T> asModifiableList(T... values)
    • contains

      public static <T> boolean contains(T[] array, T value)
    • map

      public static <T, M> M[] map(T[] array, Function<T,M> mapper)
    • mapPrimitive

      public static Integer[] mapPrimitive(int[] array)
    • contains

      public static boolean contains(int[] array, int value)
    • containsExact

      public static boolean containsExact(String[] array, String value)
    • containsExactInsensitive

      public static boolean containsExactInsensitive(String[] array, String value)
    • containsPartialInsensitive

      public static boolean containsPartialInsensitive(String[] array, String value)
    • concat

      public static <T> T[] concat(T[] array1, T[] array2)
    • concat

      public static <T> T[] concat(T[] array1, T item)
    • concat

      public static int[] concat(int[] array1, int[] array2)
    • concat

      public static int[] concat(int[] array1, int item)
    • getTypeSafeArray

      @SafeVarargs public static <E> Class<? extends E>[] getTypeSafeArray(Class<? extends E>... tasks)
    • getTypeSafeArray

      @SafeVarargs public static <E> E[] getTypeSafeArray(E... elements)