| Modifier and Type | Field and Description |
|---|---|
| private T[] | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public | UnmodifiableArrayList(T[]
The elements to use. elements, int The size must be <= the length of the elements array size)The given elements are used directly (a defensive copy is not made), and the given size is used as the size of this list. |
| Modifier and Type | Method and Description |
|---|---|
| public T | get(int
index of the element to return index)Implements abstract java. Implements java. Returns the element at the specified position in this list. |
| public int | size()
Implements abstract java. Implements java. Returns the number of elements in this list. |
| elements | back to summary |
|---|---|
| private T[] elements | |
| size | back to summary |
|---|---|
| private final int size | |
| UnmodifiableArrayList | back to summary |
|---|---|
| public UnmodifiableArrayList(T[] elements, int size) The given elements are used directly (a defensive copy is not made), and the given size is used as the size of this list. It is the callers responsibility to make sure the size is accurate.
| |
| get | back to summary |
|---|---|
| public T get(int index) Implements abstract java. Implements java. Doc from java. Returns the element at the specified position in this list.
| |
| size | back to summary |
|---|---|
| public int size() Implements abstract java. Implements java. Doc from java. Returns the number of elements in this list. If this list contains
more than
| |