Package io.github.classgraph
Class PotentiallyUnmodifiableList<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<T>
-
- io.github.classgraph.PotentiallyUnmodifiableList<T>
-
- Type Parameters:
T
- the element type
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<T>
,java.util.Collection<T>
,java.util.List<T>
,java.util.RandomAccess
- Direct Known Subclasses:
InfoList
,ResourceList
class PotentiallyUnmodifiableList<T> extends java.util.ArrayList<T>
A potentially unmodifiable list of objects.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
modifiable
Whether or not the list is modifiable.(package private) static long
serialVersionUID
serialVersionUID.
-
Constructor Summary
Constructors Constructor Description PotentiallyUnmodifiableList()
Constructor.PotentiallyUnmodifiableList(int sizeHint)
Constructor.PotentiallyUnmodifiableList(java.util.Collection<T> collection)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, T element)
boolean
add(T element)
boolean
addAll(int index, java.util.Collection<? extends T> c)
boolean
addAll(java.util.Collection<? extends T> c)
void
clear()
boolean
equals(java.lang.Object o)
int
hashCode()
java.util.Iterator<T>
iterator()
java.util.ListIterator<T>
listIterator()
(package private) void
makeUnmodifiable()
Make this list unmodifiable.T
remove(int index)
boolean
remove(java.lang.Object o)
boolean
removeAll(java.util.Collection<?> c)
boolean
retainAll(java.util.Collection<?> c)
T
set(int index, T element)
-
Methods inherited from class java.util.ArrayList
clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, lastIndexOf, listIterator, removeIf, removeRange, replaceAll, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
serialVersionUID.- See Also:
- Constant Field Values
-
modifiable
boolean modifiable
Whether or not the list is modifiable.
-
-
Constructor Detail
-
PotentiallyUnmodifiableList
PotentiallyUnmodifiableList()
Constructor.
-
PotentiallyUnmodifiableList
PotentiallyUnmodifiableList(int sizeHint)
Constructor.- Parameters:
sizeHint
- the size hint
-
PotentiallyUnmodifiableList
PotentiallyUnmodifiableList(java.util.Collection<T> collection)
Constructor.- Parameters:
collection
- the initial elements.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
-
hashCode
public int hashCode()
-
makeUnmodifiable
void makeUnmodifiable()
Make this list unmodifiable.
-
add
public boolean add(T element)
-
add
public void add(int index, T element)
-
remove
public boolean remove(java.lang.Object o)
-
remove
public T remove(int index)
-
addAll
public boolean addAll(java.util.Collection<? extends T> c)
-
addAll
public boolean addAll(int index, java.util.Collection<? extends T> c)
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
-
clear
public void clear()
-
iterator
public java.util.Iterator<T> iterator()
-
-