Class RemovalProxyArrayList<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<T>
io.github.douira.glsl_transformer.ast.data.ProxyArrayList<T>
io.github.douira.glsl_transformer.ast.data.RemovalProxyArrayList<T>
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<T>,Collection<T>,List<T>,RandomAccess
A further extension of
ProxyArrayList that also calls a notification
method whenever an element is removed. This is considerably more expensive.
The removal notification method should be idempotent and reversible with the
addition notification method.- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionRemovalProxyArrayList(int initialCapacity) RemovalProxyArrayList(Collection<? extends T> c) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()protected abstract voidnotifyRemoval(T removed) remove(int index) booleanbooleanremoveAll(Collection<?> c) booleanprotected voidremoveRange(int fromIndex, int toIndex) voidreplaceAll(UnaryOperator<T> operator) booleanretainAll(Collection<?> c) Methods inherited from class io.github.douira.glsl_transformer.ast.data.ProxyArrayList
add, add, addAll, addAll, notifyAdditionMethods inherited from class java.util.ArrayList
clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, 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
-
Constructor Details
-
RemovalProxyArrayList
public RemovalProxyArrayList() -
RemovalProxyArrayList
public RemovalProxyArrayList(int initialCapacity) -
RemovalProxyArrayList
-
-
Method Details
-
notifyRemoval
-
set
-
remove
-
remove
-
removeAll
-
replaceAll
- Specified by:
replaceAllin interfaceList<T>- Overrides:
replaceAllin classProxyArrayList<T>
-
retainAll
-
removeIf
-
removeRange
protected void removeRange(int fromIndex, int toIndex) - Overrides:
removeRangein classArrayList<T>
-
clear
public void clear()
-