public final class ArrayUtils
extends java.lang.Object
Constructor and Description |
---|
ArrayUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object[] |
copyOf(java.lang.Object object)
Get a copy of the array object.
|
static <T> boolean |
includes(java.lang.Object object,
T element,
int fromIndex)
The includes() method of Array instances determines whether an array includes a certain value among its entries,
returning true or false as appropriate.
|
static <T> int |
indexOf(java.lang.Object object,
T element,
int fromIndex)
The indexOf() method of Array instances returns the first index
at which a given element can be found in the array, or -1 if it is not present.
|
static boolean |
isEmpty(byte[] array)
Test if the input byte array is empty.
|
static boolean |
isEmpty(long[] array)
Test if the input long array is empty.
|
static <T> boolean |
isEmpty(T[] array)
Test if the input array is empty.
|
static boolean |
isNotEmpty(byte[] array)
Test if the input byte array is not empty.
|
static boolean |
isNotEmpty(long[] array)
Test if the input long array is not empty.
|
static <T> boolean |
isNotEmpty(T[] array)
Test if the input array is not empty.
|
static <T> int |
lastIndexOf(java.lang.Object object,
T element,
int fromIndex)
The lastIndexOf() method of Array instances returns the last index at which a given element can be found
in the array, or -1 if it is not present.
|
static void |
reverse(java.lang.Object object)
Reverse an array object.
|
public static java.lang.Object[] copyOf(java.lang.Object object)
object
- the array objectpublic static <T> boolean includes(java.lang.Object object, T element, int fromIndex)
T
- the type parameterobject
- the objectelement
- the elementfromIndex
- the from indexpublic static <T> int indexOf(java.lang.Object object, T element, int fromIndex)
T
- the type parameterobject
- the objectelement
- the elementfromIndex
- the from indexpublic static boolean isEmpty(byte[] array)
array
- the arraypublic static boolean isEmpty(long[] array)
array
- the arraypublic static <T> boolean isEmpty(T[] array)
T
- the type parameterarray
- the arraypublic static boolean isNotEmpty(byte[] array)
array
- the arraypublic static boolean isNotEmpty(long[] array)
array
- the arraypublic static <T> boolean isNotEmpty(T[] array)
T
- the type parameterarray
- the arraypublic static <T> int lastIndexOf(java.lang.Object object, T element, int fromIndex)
T
- the type parameterobject
- the objectelement
- the elementfromIndex
- the from indexpublic static void reverse(java.lang.Object object)
object
- the object