public class UnmodifiableArrayList<T> extends AbstractList<T> implements RandomAccess
modCount
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
T |
get(int index) |
int |
size() |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
public UnmodifiableArrayList(T[] elements, int size)
elements
- The elements to use.size
- The size must be <= the length of the elements arrayCopyright © 2020. All rights reserved.