E - type of the elementspublic class ImArrayList<E> extends java.lang.Object implements ImmutableList<E>, java.io.Serializable
ImmutableList. This is the key to
creating the initial ImmutableList.| Constructor and Description |
|---|
ImArrayList() |
ImArrayList(java.util.Collection<E> list)
Copies elements of given list into an immutable list.
|
| Modifier and Type | Method and Description |
|---|---|
E |
get(java.math.BigInteger index)
Returns the element at the specified position in this list.
|
E |
get(long index)
Returns the element at the specified position in this list.
|
java.util.Iterator<E> |
iterator() |
java.math.BigInteger |
size() |
java.lang.String |
toString() |
public ImArrayList(java.util.Collection<E> list)
list - the source list.public ImArrayList()
public java.util.Iterator<E> iterator()
iterator in interface java.lang.Iterable<E>public E get(java.math.BigInteger index)
ImmutableListget in interface ImmutableList<E>index - index of the element to returnpublic java.math.BigInteger size()
size in interface ImmutableList<E>public java.lang.String toString()
toString in class java.lang.Objectpublic E get(long index)
ImmutableListget in interface ImmutableList<E>index - index of the element to return. Allows access of elements at
indices fitting in a long.