| Constructor and Description |
|---|
ArrayUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Object[] |
insert(Object[] originalArray,
int position,
Object element)
Insert an element into the given array at position (index).
|
static boolean |
isEmpty(Object... array)
Determines whether the given array is empty or not.
|
static int |
length(Object... array)
Null-safe operation to determine an array's length.
|
static Object[] |
remove(Object[] originalArray,
int position)
Remove an element from the given array at position (index).
|
public static Object[] insert(Object[] originalArray, int position, Object element)
originalArray - the array in which to insert the element.position - an integer index (position) at which to insert the element in the array.element - the element to insert into the array.System.arraycopy(Object, int, Object, int, int),
Array.newInstance(Class, int)public static boolean isEmpty(Object... array)
array - the array to evaluate for emptiness.length(Object...)public static int length(Object... array)
array - the array to determine it's length.public static Object[] remove(Object[] originalArray, int position)
originalArray - the array from which to remove the element.position - the integer index (position) indicating the element to remove from the array.System.arraycopy(Object, int, Object, int, int),
Array.newInstance(Class, int)