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 class
SnapshotObservableList.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 void
add(int pIdx, T pElement)
boolean
add(T pElement)
boolean
addAll(int pIndex, Collection<? extends T> pCollection)
boolean
addAll(Collection<? extends T> pCollection)
void
clear()
boolean
contains(Object pObj)
boolean
containsAll(Collection<?> pCollection)
boolean
equals(Object pObject)
T
get(int pIdx)
int
hashCode()
int
indexOf(Object pObj)
boolean
isEmpty()
Iterator<T>
iterator()
int
lastIndexOf(Object pObj)
ListIterator<T>
listIterator()
ListIterator<T>
listIterator(int pIndex)
T
remove(int pIdx)
boolean
remove(Object pObj)
boolean
removeAll(Collection<?> pCollection)
void
replaceAll(UnaryOperator<T> pOperator)
boolean
retainAll(Collection<?> pObjects)
T
set(int pIdx, T pElement)
int
size()
protected void
snap()
Take snapshot and fire events.void
sort(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:
size
in interfaceCollection<T>
- Specified by:
size
in interfaceList<T>
- Specified by:
size
in classAbstractCollection<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<T>
- Specified by:
isEmpty
in interfaceList<T>
- Overrides:
isEmpty
in classAbstractCollection<T>
-
contains
public boolean contains(Object pObj)
- Specified by:
contains
in interfaceCollection<T>
- Specified by:
contains
in interfaceList<T>
- Overrides:
contains
in classAbstractCollection<T>
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<T>
- Specified by:
toArray
in interfaceList<T>
- Overrides:
toArray
in classAbstractCollection<T>
-
toArray
public <T> T[] toArray(T[] pAry)
- Specified by:
toArray
in interfaceCollection<T>
- Specified by:
toArray
in interfaceList<T>
- Overrides:
toArray
in classAbstractCollection<T>
-
add
public boolean add(T pElement)
- Specified by:
add
in interfaceCollection<T>
- Specified by:
add
in interfaceList<T>
- Overrides:
add
in classAbstractList<T>
-
add
public void add(int pIdx, T pElement)
-
remove
public boolean remove(Object pObj)
- Specified by:
remove
in interfaceCollection<T>
- Specified by:
remove
in interfaceList<T>
- Overrides:
remove
in classAbstractCollection<T>
-
remove
public T remove(int pIdx)
-
containsAll
public boolean containsAll(Collection<?> pCollection)
- Specified by:
containsAll
in interfaceCollection<T>
- Specified by:
containsAll
in interfaceList<T>
- Overrides:
containsAll
in classAbstractCollection<T>
-
addAll
public boolean addAll(Collection<? extends T> pCollection)
- Specified by:
addAll
in interfaceCollection<T>
- Specified by:
addAll
in interfaceList<T>
- Overrides:
addAll
in classAbstractCollection<T>
-
addAll
public boolean addAll(int pIndex, Collection<? extends T> pCollection)
-
removeAll
public boolean removeAll(Collection<?> pCollection)
- Specified by:
removeAll
in interfaceCollection<T>
- Specified by:
removeAll
in interfaceList<T>
- Overrides:
removeAll
in classAbstractCollection<T>
-
retainAll
public boolean retainAll(Collection<?> pObjects)
- Specified by:
retainAll
in interfaceCollection<T>
- Specified by:
retainAll
in interfaceList<T>
- Overrides:
retainAll
in classAbstractCollection<T>
-
replaceAll
public void replaceAll(UnaryOperator<T> pOperator)
-
sort
public void sort(Comparator<? super T> pComparator)
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<T>
- Specified by:
clear
in interfaceList<T>
- Overrides:
clear
in classAbstractList<T>
-
equals
public boolean equals(Object pObject)
- Specified by:
equals
in interfaceCollection<T>
- Specified by:
equals
in interfaceList<T>
- Overrides:
equals
in classAbstractList<T>
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceCollection<T>
- Specified by:
hashCode
in interfaceList<T>
- Overrides:
hashCode
in classAbstractList<T>
-
get
public T get(int pIdx)
-
indexOf
public int indexOf(Object pObj)
-
lastIndexOf
public int lastIndexOf(Object pObj)
- Specified by:
lastIndexOf
in interfaceList<T>
- Overrides:
lastIndexOf
in classAbstractList<T>
-
listIterator
public ListIterator<T> listIterator()
- Specified by:
listIterator
in interfaceList<T>
- Overrides:
listIterator
in classAbstractList<T>
-
listIterator
public ListIterator<T> listIterator(int pIndex)
- Specified by:
listIterator
in interfaceList<T>
- Overrides:
listIterator
in classAbstractList<T>
-
spliterator
public Spliterator<T> spliterator()
-
-