E - The type of elements in the array.public final class ArrayWrapper<E>
extends java.lang.Object
This class is intended for use as a key to a map.
Arrays| Constructor and Description |
|---|
ArrayWrapper(E... elements)
Creates an array wrapper with some elements.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other)
Determines if this object has a value equivalent to another object.
|
E[] |
getArray()
Retrieves a reference to the wrapped array instance.
|
int |
hashCode()
Gets the hash code represented by this objects value.
|
void |
setArray(E[] array)
Set this wrapper to wrap a new array instance.
|
static <T> T[] |
toArray(java.lang.Iterable<? extends T> list,
java.lang.Class<T> c)
Converts an iterable element collection to an array of elements.
|
public ArrayWrapper(E... elements)
elements - The elements of the array.public E[] getArray()
public void setArray(E[] array)
array - The new wrapped array.public boolean equals(java.lang.Object other)
equals in class java.lang.ObjectArrays.equals(Object[], Object[])public int hashCode()
hashCode in class java.lang.ObjectArrays.hashCode(Object[])public static <T> T[] toArray(java.lang.Iterable<? extends T> list,
java.lang.Class<T> c)
list - The iterable of objects which will be converted to an array.c - The type of the elements of the array.