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 TypeMethodDescriptionvoid
boolean
boolean
addAll
(int index, Collection<? extends T> c) boolean
addAll
(Collection<? extends T> c) void
clear()
int
remove
(int index) boolean
boolean
removeAll
(Collection<?> c) protected void
removeRange
(int fromIndex, int toIndex) void
reorderList
(List<T> newOrder, boolean withEvent) boolean
retainAll
(Collection<?> c) void
void
sort
(Comparator<? super T> c) void
void
Update 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, toArray
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods 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:
getChangeIndex
in interfaceIListWithChangeIndex<T>
-
updateChangeIndex
public void updateChangeIndex()Update the change Index from outside.- Specified by:
updateChangeIndex
in interfaceIListWithChangeIndex<T>
-
setListWithChangeIndexListener
- Specified by:
setListWithChangeIndexListener
in interfaceIListWithChangeIndex<T>
-
add
-
add
-
addAll
-
addAll
-
clear
public void clear() -
remove
-
remove
-
removeRange
protected void removeRange(int fromIndex, int toIndex) - Overrides:
removeRange
in classArrayList<T>
-
set
-
trimToSize
public void trimToSize()- Overrides:
trimToSize
in classArrayList<T>
-
removeAll
-
retainAll
-
sort
-
reorderList
-