Class MemoizationListImpl<E>
java.lang.Object
org.reactfx.ObservableBase<LiveList.Observer<? super E, ?>, QuasiListChange<? extends E>>
org.reactfx.collection.LiveListBase<E>
org.reactfx.collection.MemoizationListImpl<E>
- All Implemented Interfaces:
Iterable<E>, Collection<E>, List<E>, SequencedCollection<E>, javafx.beans.Observable, javafx.collections.ObservableList<E>, AccessorListMethods<E>, LiveList<E>, MemoizationList<E>, ProperLiveList<E>, UnmodifiableByDefaultList<E>, UnmodifiableByDefaultLiveList<E>, Observable<LiveList.Observer<? super E, ?>>, ProperObservable<LiveList.Observer<? super E, ?>, QuasiListChange<? extends E>>
class MemoizationListImpl<E>
extends LiveListBase<E>
implements MemoizationList<E>, UnmodifiableByDefaultLiveList<E>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface LiveList
LiveList.Observer<E,O>, LiveList.QuasiChangeObserver<E>, LiveList.QuasiModificationObserver<E> -
Property Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MemoizationListImpl<E>.MemoizedViewprivate final javafx.collections.ObservableList<E> private final SparseList<E> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidforce(int from, int to) voidforget(int from, int to) get(int index) getIfMemoized(int index) intintgetMemoizedCountAfter(int position) intgetMemoizedCountBefore(int position) javafx.scene.control.IndexRangeintindexOfMemoizedItem(int index) booleanisMemoized(int index) protected SubscriptionStarts observing this observable's input(s), if any.intsize()private voidsourceChanged(QuasiListChange<? extends E> qc) Methods inherited from class ObservableBase
addObserver, enqueueNotifications, equals, forEachObserver, getObserverCount, hashCode, isObservingInputs, newObserver, notifyObservers, notifyObservers, observe, removeObserver, toStringMethods inherited from interface AccessorListMethods
contains, containsAll, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, subList, toArray, toArrayMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, replaceAll, reversed, sort, spliteratorMethods inherited from interface LiveList
addChangeObserver, addListener, addListener, addModificationObserver, addQuasiChangeObserver, addQuasiModificationObserver, changes, collapse, collapseDynamic, map, mapDynamic, memoize, modifications, observeChanges, observeModifications, observeQuasiChanges, observeQuasiModifications, pin, quasiChanges, quasiModifications, reduce, reduceRange, removeChangeObserver, removeListener, removeListener, removeModificationObserver, removeQuasiChangeObserver, removeQuasiModificationObserver, sizeProperty, suspendableMethods inherited from interface Observable
addObserver, observe, removeObserverMethods inherited from interface javafx.collections.ObservableList
filtered, sorted, sortedMethods inherited from interface ProperLiveList
contentReplacement, defaultEquals, defaultHashCode, defaultNotificationAccumulator, defaultToString, fireContentReplacement, fireElemInsertion, fireElemRemoval, fireElemReplacement, fireModification, fireRangeInsertion, fireRemoveRangeMethods inherited from interface ProperObservable
notifyObservers
-
Field Details
-
sparseList
-
memoizedItems
-
source
-
-
Constructor Details
-
MemoizationListImpl
MemoizationListImpl(javafx.collections.ObservableList<E> source)
-
-
Method Details
-
observeInputs
Description copied from class:ObservableBaseStarts observing this observable's input(s), if any. This method is called when the number of observers goes from 0 to 1. This method is called beforeObservableBase.newObserver(Object)is called for the first observer.- Specified by:
observeInputsin classObservableBase<LiveList.Observer<? super E, ?>, QuasiListChange<? extends E>>- Returns:
- subscription used to stop observing inputs. The subscription is unsubscribed (i.e. input observation stops) when the number of observers goes down to 0.
-
sourceChanged
-
get
-
force
public void force(int from, int to) - Specified by:
forcein interfaceMemoizationList<E>
-
size
-
memoizedItems
- Specified by:
memoizedItemsin interfaceMemoizationList<E>
-
isMemoized
public boolean isMemoized(int index) - Specified by:
isMemoizedin interfaceMemoizationList<E>
-
getIfMemoized
- Specified by:
getIfMemoizedin interfaceMemoizationList<E>
-
getMemoizedCountBefore
public int getMemoizedCountBefore(int position) - Specified by:
getMemoizedCountBeforein interfaceMemoizationList<E>
-
getMemoizedCountAfter
public int getMemoizedCountAfter(int position) - Specified by:
getMemoizedCountAfterin interfaceMemoizationList<E>
-
getMemoizedCount
public int getMemoizedCount()- Specified by:
getMemoizedCountin interfaceMemoizationList<E>
-
forget
public void forget(int from, int to) - Specified by:
forgetin interfaceMemoizationList<E>
-
indexOfMemoizedItem
public int indexOfMemoizedItem(int index) - Specified by:
indexOfMemoizedItemin interfaceMemoizationList<E>
-
getMemoizedItemsRange
public javafx.scene.control.IndexRange getMemoizedItemsRange()- Specified by:
getMemoizedItemsRangein interfaceMemoizationList<E>
-