public class ArrayUtil
extends java.lang.Object
Arrays
Constructor and Description |
---|
ArrayUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
indexOf(java.lang.Object[] a,
java.lang.Object key)
Searches for the first matching entry in an array.
|
static java.lang.Object[] |
keys(java.util.Map m)
Returns an array of all the keys in a map.
|
static java.lang.Object[] |
keys(java.util.Map m,
java.lang.Object[] keys)
Returns an array of all the keys in a map.
|
static java.lang.String[] |
stringKeys(java.util.Map m)
Returns a string array of the keys in a map.
|
public static int indexOf(java.lang.Object[] a, java.lang.Object key)
a
- the array objectkey
- the search keypublic static java.lang.Object[] keys(java.util.Map m)
m
- the map objectpublic static java.lang.Object[] keys(java.util.Map m, java.lang.Object[] keys)
m
- the map objectkeys
- the array of keyspublic static java.lang.String[] stringKeys(java.util.Map m)
m
- the map objectjava.lang.ClassCastException
- if one of the keys wasn't a string