Class PotentiallyUnmodifiableList<T>
java.lang.Object
java.util.AbstractCollection<T>
java.util.AbstractList<T>
java.util.ArrayList<T>
io.github.classgraph.PotentiallyUnmodifiableList<T>
- Type Parameters:
T- the element type
- All Implemented Interfaces:
Serializable, Cloneable, Iterable<T>, Collection<T>, List<T>, RandomAccess, SequencedCollection<T>
- Direct Known Subclasses:
InfoList, ResourceList
A potentially unmodifiable list of objects.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) booleanWhether or not the list is modifiable.(package private) static final longserialVersionUID.Fields inherited from class AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.PotentiallyUnmodifiableList(int sizeHint) Constructor.PotentiallyUnmodifiableList(Collection<T> collection) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends T> c) booleanaddAll(Collection<? extends T> c) voidclear()booleaninthashCode()iterator()(package private) voidMake this list unmodifiable.remove(int index) booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) Methods inherited from class ArrayList
addFirst, addLast, clone, contains, ensureCapacity, forEach, get, getFirst, getLast, indexOf, isEmpty, lastIndexOf, listIterator, removeFirst, removeIf, removeLast, removeRange, replaceAll, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class AbstractCollection
containsAll, toStringMethods inherited from interface Collection
parallelStream, stream, toArrayMethods inherited from interface List
containsAll, reversed
-
Field Details
-
serialVersionUID
static final long serialVersionUIDserialVersionUID.- See Also:
-
modifiable
boolean modifiableWhether or not the list is modifiable.
-
-
Constructor Details
-
PotentiallyUnmodifiableList
PotentiallyUnmodifiableList()Constructor. -
PotentiallyUnmodifiableList
PotentiallyUnmodifiableList(int sizeHint) Constructor.- Parameters:
sizeHint- the size hint
-
PotentiallyUnmodifiableList
PotentiallyUnmodifiableList(Collection<T> collection) Constructor.- Parameters:
collection- the initial elements.
-
-
Method Details
-
equals
-
hashCode
-
makeUnmodifiable
void makeUnmodifiable()Make this list unmodifiable. -
add
-
add
-
remove
-
remove
-
addAll
-
addAll
-
removeAll
-
retainAll
-
clear
-
set
-
iterator
-
listIterator
- Specified by:
listIteratorin interfaceList<T>- Overrides:
listIteratorin classArrayList<T>
-