E
- The type of elements in the array.public final class ArrayWrapper<E> extends 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(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(Iterable<? extends T> list,
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(Object other)
equals
in class Object
Arrays.equals(Object[], Object[])
public int hashCode()
hashCode
in class Object
Arrays.hashCode(Object[])
public static <T> T[] toArray(Iterable<? extends T> list, Class<T> c)
list
- The iterable of objects which will be converted to an array.c
- The type of the elements of the array.Copyright © 2020. All rights reserved.