|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.common.collect.ObjectArrays
public final class ObjectArrays
Static utility methods pertaining to object arrays.
Field Summary | |
---|---|
static Object[] |
EMPTY_ARRAY
An empty object array. |
Method Summary | ||
---|---|---|
static
|
concat(T[] first,
T[] second,
Class<T> type)
Returns a new array that contains the concatenated contents of two arrays. |
|
static
|
emptyArray(T[] array)
Returns an empty array with the same component type as the specified array. |
|
static
|
newArray(Class<T> type,
int length)
Returns a new array of the given length with the specified component type. |
|
static
|
newArray(T[] reference,
int length)
Returns a new array of the given length with the same type as a reference array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Object[] EMPTY_ARRAY
Method Detail |
---|
public static <T> T[] newArray(Class<T> type, int length)
type
- the component typelength
- the length of the new arraypublic static <T> T[] newArray(T[] reference, int length)
reference
- any array of the desired typelength
- the length of the new arraypublic static <T> T[] emptyArray(T[] array)
array
- the array from which to infer the component typepublic static <T> T[] concat(T[] first, T[] second, Class<T> type)
first
- the first array of elements to concatenatesecond
- the second array of elements to concatenatetype
- the component type of the returned array
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |