public class ArrayUtil
extends java.lang.Object
Constructor and Description |
---|
ArrayUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean[] |
copy(boolean[] array)
Creates a new copy of the given array.
|
static double[] |
copy(double[] array)
Creates a new copy of the given array.
|
static int[] |
copy(int[] array)
Creates a new copy of the given array.
|
static long[] |
copy(long[] array)
Creates a new copy of the given array.
|
static <T> T[] |
copy(T[] array)
Creates a new copy of the given array.
|
static boolean |
isEmpty(boolean[] array)
Determines if the given array is null or empty (length 0).
|
static boolean |
isEmpty(double[] array)
Determines if the given array is null or empty (length 0).
|
static boolean |
isEmpty(int[] array)
Determines if the given array is null or empty (length 0).
|
static boolean |
isEmpty(long[] array)
Determines if the given array is null or empty (length 0).
|
static boolean |
isEmpty(java.lang.Object[] array)
Determines if the given array is null or empty (length 0).
|
static void |
reverse(boolean[] array)
Reverses the ordering of elements in an array.
|
static void |
reverse(double[] array)
Reverses the ordering of elements in an array.
|
static void |
reverse(int[] array)
Reverses the ordering of elements in an array.
|
static void |
reverse(long[] array)
Reverses the ordering of elements in an array.
|
static void |
reverse(java.lang.Object[] array)
Reverses the ordering of elements in an array.
|
public static boolean[] copy(boolean[] array)
array
- The array to copy.public static int[] copy(int[] array)
array
- The array to copy.public static long[] copy(long[] array)
array
- The array to copy.public static double[] copy(double[] array)
array
- The array to copy.public static <T> T[] copy(T[] array)
T
- The type of data in the array.array
- The array to copy. Does not copy the elements.public static void reverse(boolean[] array)
array
- The array to reverse the elements in.public static void reverse(int[] array)
array
- The array to reverse the elements in.public static void reverse(long[] array)
array
- The array to reverse the elements in.public static void reverse(double[] array)
array
- The array to reverse the elements in.public static void reverse(java.lang.Object[] array)
array
- The array to reverse the elements in.public static boolean isEmpty(boolean[] array)
array
- The array.public static boolean isEmpty(int[] array)
array
- The array.public static boolean isEmpty(long[] array)
array
- The array.public static boolean isEmpty(double[] array)
array
- The array.public static boolean isEmpty(java.lang.Object[] array)
array
- The array.