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, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArrayparallelStream, removeIf, streampublic UnmodifiableArrayList(T[] elements, int size)
elements - The elements to use.size - The size must be <= the length of the elements arrayCopyright © 2025. All rights reserved.