public class Arrays2
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.annotation.Annotation[] |
EMPTY_ANNOTATION_ARRAY |
static java.lang.Object[] |
EMPTY_ARRAY |
static java.lang.Class<?>[] |
EMPTY_CLASS_ARRAY |
static java.lang.reflect.Type[] |
EMPTY_TYPE_ARRAY |
| Modifier and Type | Method and Description |
|---|---|
static <T> java.util.Set<T> |
asSet(T... array) |
static boolean |
containsAll(java.lang.Object[] array,
java.lang.Object... values) |
static <T> T[] |
copyOf(T[] original,
int newLength)
Copies the specified array, truncating or padding with nulls (if necessary)
so the copy has the specified length.
|
static <T,U> T[] |
copyOf(U[] original,
int newLength,
java.lang.Class<? extends T[]> newType)
Copies the specified array, truncating or padding with nulls (if necessary)
so the copy has the specified length.
|
static boolean |
unorderedEquals(java.lang.Object[] array,
java.lang.Object... values) |
public static final java.lang.Object[] EMPTY_ARRAY
public static final java.lang.annotation.Annotation[] EMPTY_ANNOTATION_ARRAY
public static final java.lang.reflect.Type[] EMPTY_TYPE_ARRAY
public static final java.lang.Class<?>[] EMPTY_CLASS_ARRAY
public static final boolean containsAll(java.lang.Object[] array,
java.lang.Object... values)
public static final boolean unorderedEquals(java.lang.Object[] array,
java.lang.Object... values)
@SafeVarargs public static <T> java.util.Set<T> asSet(T... array)
public static <T> T[] copyOf(T[] original,
int newLength)
original - the array to be copiednewLength - the length of the copy to be returnedjava.lang.NegativeArraySizeException - if newLength is negativejava.lang.NullPointerException - if original is nullpublic static <T,U> T[] copyOf(U[] original,
int newLength,
java.lang.Class<? extends T[]> newType)
original - the array to be copiednewLength - the length of the copy to be returnednewType - the class of the copy to be returnedjava.lang.NegativeArraySizeException - if newLength is negativejava.lang.NullPointerException - if original is nulljava.lang.ArrayStoreException - if an element copied from
original is not of a runtime type that can be stored in
an array of class newTypeCopyright © 2014. All Rights Reserved.