Package org.rspeer.commons
Class ArrayUtils
java.lang.Object
org.rspeer.commons.ArrayUtils
Provides utilities for arrays
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T>
asModifiableList
(T... values) static int[]
concat
(int[] array1, int item) static int[]
concat
(int[] array1, int[] array2) static <T> T[]
concat
(T[] array1, T item) static <T> T[]
concat
(T[] array1, T[] array2) static boolean
contains
(int[] array, int value) static <T> boolean
contains
(T[] array, T value) static boolean
containsExact
(String[] array, String value) static boolean
containsExactInsensitive
(String[] array, String value) static boolean
containsPartialInsensitive
(String[] array, String value) static <E> E[]
getTypeSafeArray
(E... elements) static <E> Class<? extends E>[]
getTypeSafeArray
(Class<? extends E>... tasks) static <T,
M> M[] static Integer[]
mapPrimitive
(int[] array)
-
Constructor Details
-
ArrayUtils
public ArrayUtils()
-
-
Method Details
-
asModifiableList
-
contains
public static <T> boolean contains(T[] array, T value) -
map
-
mapPrimitive
-
contains
public static boolean contains(int[] array, int value) -
containsExact
-
containsExactInsensitive
-
containsPartialInsensitive
-
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
-
getTypeSafeArray
-