Class ArrayUtil
java.lang.Object
org.eclipse.nebula.widgets.nattable.util.ArrayUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Collection<T>asCollection(T[] array) static int[]asIntArray(int... ints) static int[]asIntArray(Collection<Integer> list) Transforms the given collection ofIntegers to an array of primitiveintvalues.asIntegerList(int... ints) static <T> List<T>asList(T[] array) static booleanisEmpty(int[] array) static booleanstatic booleanisNotEmpty(int[] array) static booleanisNotEmpty(String[] array) static int[]subarray(int[] array, int startIndexInclusive, int endIndexExclusive) Creates a newintarray containing the elements between start and end indices.
-
Field Details
-
STRING_TYPE_ARRAY
-
INT_TYPE_ARRAY
public static final int[] INT_TYPE_ARRAY
-
-
Method Details
-
asList
-
asCollection
-
asIntArray
public static int[] asIntArray(int... ints) -
asIntegerList
-
isEmpty
public static boolean isEmpty(int[] array) -
isEmpty
-
isNotEmpty
public static boolean isNotEmpty(int[] array) -
isNotEmpty
-
asIntArray
Transforms the given collection ofIntegers to an array of primitiveintvalues.- Parameters:
list- The collection ofIntegers to transform- Returns:
- The array representation of primitive
intvalues.
-
subarray
public static int[] subarray(int[] array, int startIndexInclusive, int endIndexExclusive) Creates a newintarray containing the elements between start and end indices.Similar to Apache Commons Lang
ArrayUtils.subarray()- Parameters:
array-startIndexInclusive-endIndexExclusive-- Returns:
-