Package org.rspeer.commons
Class ArrayUtils
- java.lang.Object
-
- org.rspeer.commons.ArrayUtils
-
public class ArrayUtils extends Object
Provides utilities for arrays
-
-
Constructor Summary
Constructors Constructor Description ArrayUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <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[]map(T[] array, Function<T,M> mapper)
static Integer[]
mapPrimitive(int[] array)
-
-
-
Method Detail
-
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)
-
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)
-
-