Package io.github.classgraph
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 java.util.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 java.util.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 java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.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
public int hashCode() -
makeUnmodifiable
void makeUnmodifiable()Make this list unmodifiable. -
add
-
add
-
remove
-
remove
-
addAll
-
addAll
-
removeAll
-
retainAll
-
clear
public void clear() -
set
-
iterator
-
listIterator
- Specified by:
listIteratorin interfaceList<T>- Overrides:
listIteratorin classArrayList<T>
-