Module com.iamsoft.util.ui
Class SnapshotObservableList<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- javafx.collections.ObservableListBase<T>
-
- com.iamsoft.util.ui.javafx.collections.SnapshotObservableList<T>
-
- Type Parameters:
T- the list element type.
- All Implemented Interfaces:
Iterable<T>,Collection<T>,List<T>,javafx.beans.Observable,javafx.collections.ObservableList<T>
- Direct Known Subclasses:
SnapshotObservableList.Exposed
public class SnapshotObservableList<T> extends javafx.collections.ObservableListBase<T>Takes snapshots of list and composes events by comparing snapshots.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSnapshotObservableList.Exposed<T>Exposes snap().
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description SnapshotObservableList()SnapshotObservableList(List<T> pDelegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int pIdx, T pElement)booleanadd(T pElement)booleanaddAll(int pIndex, Collection<? extends T> pCollection)booleanaddAll(Collection<? extends T> pCollection)voidclear()booleancontains(Object pObj)booleancontainsAll(Collection<?> pCollection)booleanequals(Object pObject)Tget(int pIdx)inthashCode()intindexOf(Object pObj)booleanisEmpty()Iterator<T>iterator()intlastIndexOf(Object pObj)ListIterator<T>listIterator()ListIterator<T>listIterator(int pIndex)Tremove(int pIdx)booleanremove(Object pObj)booleanremoveAll(Collection<?> pCollection)voidreplaceAll(UnaryOperator<T> pOperator)booleanretainAll(Collection<?> pObjects)Tset(int pIdx, T pElement)intsize()protected voidsnap()Take snapshot and fire events.voidsort(Comparator<? super T> pComparator)Spliterator<T>spliterator()List<T>subList(int pFromIndex, int pToIndex)Object[]toArray()<T> T[]toArray(T[] pAry)-
Methods inherited from class javafx.collections.ObservableListBase
addAll, addListener, addListener, beginChange, endChange, fireChange, hasListeners, nextAdd, nextPermutation, nextRemove, nextRemove, nextReplace, nextSet, nextUpdate, remove, removeAll, removeListener, removeListener, retainAll, setAll, setAll
-
Methods inherited from class java.util.AbstractList
removeRange
-
Methods inherited from class java.util.AbstractCollection
toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
-
-
-
Method Detail
-
snap
protected void snap()
Take snapshot and fire events.
-
size
public int size()
- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfaceList<T>- Specified by:
sizein classAbstractCollection<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<T>- Specified by:
isEmptyin interfaceList<T>- Overrides:
isEmptyin classAbstractCollection<T>
-
contains
public boolean contains(Object pObj)
- Specified by:
containsin interfaceCollection<T>- Specified by:
containsin interfaceList<T>- Overrides:
containsin classAbstractCollection<T>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<T>- Specified by:
toArrayin interfaceList<T>- Overrides:
toArrayin classAbstractCollection<T>
-
toArray
public <T> T[] toArray(T[] pAry)
- Specified by:
toArrayin interfaceCollection<T>- Specified by:
toArrayin interfaceList<T>- Overrides:
toArrayin classAbstractCollection<T>
-
add
public boolean add(T pElement)
- Specified by:
addin interfaceCollection<T>- Specified by:
addin interfaceList<T>- Overrides:
addin classAbstractList<T>
-
add
public void add(int pIdx, T pElement)
-
remove
public boolean remove(Object pObj)
- Specified by:
removein interfaceCollection<T>- Specified by:
removein interfaceList<T>- Overrides:
removein classAbstractCollection<T>
-
remove
public T remove(int pIdx)
-
containsAll
public boolean containsAll(Collection<?> pCollection)
- Specified by:
containsAllin interfaceCollection<T>- Specified by:
containsAllin interfaceList<T>- Overrides:
containsAllin classAbstractCollection<T>
-
addAll
public boolean addAll(Collection<? extends T> pCollection)
- Specified by:
addAllin interfaceCollection<T>- Specified by:
addAllin interfaceList<T>- Overrides:
addAllin classAbstractCollection<T>
-
addAll
public boolean addAll(int pIndex, Collection<? extends T> pCollection)
-
removeAll
public boolean removeAll(Collection<?> pCollection)
- Specified by:
removeAllin interfaceCollection<T>- Specified by:
removeAllin interfaceList<T>- Overrides:
removeAllin classAbstractCollection<T>
-
retainAll
public boolean retainAll(Collection<?> pObjects)
- Specified by:
retainAllin interfaceCollection<T>- Specified by:
retainAllin interfaceList<T>- Overrides:
retainAllin classAbstractCollection<T>
-
replaceAll
public void replaceAll(UnaryOperator<T> pOperator)
-
sort
public void sort(Comparator<? super T> pComparator)
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<T>- Specified by:
clearin interfaceList<T>- Overrides:
clearin classAbstractList<T>
-
equals
public boolean equals(Object pObject)
- Specified by:
equalsin interfaceCollection<T>- Specified by:
equalsin interfaceList<T>- Overrides:
equalsin classAbstractList<T>
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceCollection<T>- Specified by:
hashCodein interfaceList<T>- Overrides:
hashCodein classAbstractList<T>
-
get
public T get(int pIdx)
-
indexOf
public int indexOf(Object pObj)
-
lastIndexOf
public int lastIndexOf(Object pObj)
- Specified by:
lastIndexOfin interfaceList<T>- Overrides:
lastIndexOfin classAbstractList<T>
-
listIterator
public ListIterator<T> listIterator()
- Specified by:
listIteratorin interfaceList<T>- Overrides:
listIteratorin classAbstractList<T>
-
listIterator
public ListIterator<T> listIterator(int pIndex)
- Specified by:
listIteratorin interfaceList<T>- Overrides:
listIteratorin classAbstractList<T>
-
spliterator
public Spliterator<T> spliterator()
-
-