Class ProxyArrayList<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>
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<T>,Collection<T>,List<T>,RandomAccess
- Direct Known Subclasses:
ChildNodeList
An array list extension that calls a notification method whenever an element
is added or removed from the list. The notification methods should be
idempotent and reversible with the inverse other method.
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionProxyArrayList(int initialCapacity) ProxyArrayList(Collection<? extends T> c) ProxyArrayList(Collection<? extends T> c, boolean notifyInitial) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends T> c) booleanaddAll(Collection<? extends T> c) voidclear()protected abstract voidnotifyAddition(T added) 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 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
-
ProxyArrayList
public ProxyArrayList() -
ProxyArrayList
public ProxyArrayList(int initialCapacity) -
ProxyArrayList
-
ProxyArrayList
-
-
Method Details
-
notifyAddition
-
notifyRemoval
-
set
-
add
-
add
-
addAll
-
addAll
-
remove
-
remove
-
removeAll
-
replaceAll
- Specified by:
replaceAllin interfaceList<T>- Overrides:
replaceAllin classArrayList<T>
-
retainAll
-
removeIf
-
removeRange
protected void removeRange(int fromIndex, int toIndex) - Overrides:
removeRangein classArrayList<T>
-
clear
public void clear()
-