Package org.eclnt.jsfserver.util
Class ArrayListWithChangeIndex<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<T>
org.eclnt.jsfserver.util.ArrayListWithChangeIndex<T>
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<T>,Collection<T>,List<T>,RandomAccess,IListWithChangeIndex<T>
public class ArrayListWithChangeIndex<T>
extends ArrayList<T>
implements IListWithChangeIndex<T>, Serializable
Array list that is a direct extension of ArrayList. Every time the array is
updated through a corresponding method (e.g. add()), then the change listener
is called - so that the change listener gets notified.
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends T> c) booleanaddAll(Collection<? extends T> c) voidclear()intremove(int index) booleanbooleanremoveAll(Collection<?> c) protected voidremoveRange(int fromIndex, int toIndex) voidreorderList(List<T> newOrder, boolean withEvent) booleanretainAll(Collection<?> c) voidvoidsort(Comparator<? super T> c) voidvoidUpdate the change Index from outside.Methods inherited from class java.util.ArrayList
clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeIf, replaceAll, size, spliterator, subList, toArray, toArrayMethods 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, removeIf, stream, toArrayMethods inherited from interface java.util.List
contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, replaceAll, size, spliterator, subList, toArray, toArray
-
Constructor Details
-
ArrayListWithChangeIndex
public ArrayListWithChangeIndex()
-
-
Method Details
-
getChangeIndex
public int getChangeIndex()- Specified by:
getChangeIndexin interfaceIListWithChangeIndex<T>
-
updateChangeIndex
public void updateChangeIndex()Update the change Index from outside.- Specified by:
updateChangeIndexin interfaceIListWithChangeIndex<T>
-
setListWithChangeIndexListener
- Specified by:
setListWithChangeIndexListenerin interfaceIListWithChangeIndex<T>
-
add
-
add
-
addAll
-
addAll
-
clear
public void clear() -
remove
-
remove
-
removeRange
protected void removeRange(int fromIndex, int toIndex) - Overrides:
removeRangein classArrayList<T>
-
set
-
trimToSize
public void trimToSize()- Overrides:
trimToSizein classArrayList<T>
-
removeAll
-
retainAll
-
sort
-
reorderList
-