Modifier and Type | Field and Description |
---|---|
static boolean[] |
EMPTY_BOOLEAN_ARRAY |
static byte[] |
EMPTY_BYTE_ARRAY |
static char[] |
EMPTY_CHAR_ARRAY |
static java.lang.Class[] |
EMPTY_CLASS_ARRAY |
static java.util.Collection[] |
EMPTY_COLLECTION_ARRAY |
static java.io.File[] |
EMPTY_FILE_ARRAY |
static int[] |
EMPTY_INT_ARRAY |
static long[] |
EMPTY_LONG_ARRAY |
static java.lang.Object[] |
EMPTY_OBJECT_ARRAY |
static short[] |
EMPTY_SHORT_ARRAY |
static java.lang.String[] |
EMPTY_STRING_ARRAY |
Constructor and Description |
---|
ArrayUtilRt() |
Modifier and Type | Method and Description |
---|---|
static <T> int |
find(T[] src,
T obj) |
static <T> int |
indexOf(T[] src,
T obj,
int start,
int end) |
static java.lang.String[] |
toStringArray(java.util.Collection<java.lang.String> collection) |
public static final short[] EMPTY_SHORT_ARRAY
public static final char[] EMPTY_CHAR_ARRAY
public static final byte[] EMPTY_BYTE_ARRAY
public static final int[] EMPTY_INT_ARRAY
public static final boolean[] EMPTY_BOOLEAN_ARRAY
public static final java.lang.Object[] EMPTY_OBJECT_ARRAY
public static final java.lang.String[] EMPTY_STRING_ARRAY
public static final java.lang.Class[] EMPTY_CLASS_ARRAY
public static final long[] EMPTY_LONG_ARRAY
public static final java.util.Collection[] EMPTY_COLLECTION_ARRAY
public static final java.io.File[] EMPTY_FILE_ARRAY
public static java.lang.String[] toStringArray(java.util.Collection<java.lang.String> collection)
public static <T> int find(T[] src, T obj)
src
- source array.obj
- object to be found.obj
in the src
array.
Returns -1
if passed object isn't found. This method uses
equals
of arrays elements to compare obj
with
these elements.public static <T> int indexOf(T[] src, T obj, int start, int end)