Package org.reactfx.collection
Class ListRangeReduction<T>
java.lang.Object
org.reactfx.ObservableBase<Consumer<? super T>,T>
org.reactfx.value.ValBase<T>
org.reactfx.collection.ListReduction<T>
org.reactfx.collection.ListRangeReduction<T>
- All Implemented Interfaces:
javafx.beans.Observable
,javafx.beans.value.ObservableValue<T>
,Observable<Consumer<? super T>>
,ProperObservable<Consumer<? super T>,
,T> ProperVal<T>
,Val<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final javafx.beans.value.ObservableValue
<javafx.scene.control.IndexRange> -
Constructor Summary
ConstructorsConstructorDescriptionListRangeReduction
(javafx.collections.ObservableList<T> input, javafx.beans.value.ObservableValue<javafx.scene.control.IndexRange> range, BinaryOperator<T> reduction) -
Method Summary
Modifier and TypeMethodDescriptionprotected Subscription
connect()
Implementation of this method should start observing inputs.protected int
getFrom
(int max) protected int
getTo
(int max) Methods inherited from class org.reactfx.collection.ListReduction
computeValue
Methods inherited from class org.reactfx.value.ValBase
getValue, invalidate, newObserver, observeInputs
Methods inherited from class org.reactfx.ObservableBase
addObserver, enqueueNotifications, equals, forEachObserver, getObserverCount, hashCode, isObservingInputs, notifyObservers, notifyObservers, observe, removeObserver, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.reactfx.Observable
addObserver, observe, removeObserver
Methods inherited from interface org.reactfx.ProperObservable
defaultEquals, defaultHashCode, defaultToString, notifyObservers
Methods inherited from interface org.reactfx.value.ProperVal
defaultNotificationAccumulator
Methods inherited from interface org.reactfx.value.Val
addInvalidationObserver, addListener, addListener, animate, animate, asList, asVar, changes, conditionOn, conditionOnShowing, filter, flatMap, getOpt, getOrElse, getOrSupply, getOrThrow, ifPresent, invalidations, isEmpty, isPresent, map, mapDynamic, observeChanges, observeInvalidations, orElse, orElseConst, pin, removeInvalidationObserver, removeListener, removeListener, selectVar, selectVar, suspendable, values
-
Field Details
-
range
private final javafx.beans.value.ObservableValue<javafx.scene.control.IndexRange> range
-
-
Constructor Details
-
ListRangeReduction
ListRangeReduction(javafx.collections.ObservableList<T> input, javafx.beans.value.ObservableValue<javafx.scene.control.IndexRange> range, BinaryOperator<T> reduction)
-
-
Method Details
-
connect
Description copied from class:ValBase
Implementation of this method should start observing inputs. If the value of this Val may change as a result of input change, the corresponding input observer should callValBase.invalidate()
to notify observers of this Val. By the time of calling ValBase.invalidate(), the input observer must have already updated any internal state of this Val, so that a subsequent call toValBase.computeValue()
returns the current value of this Val.- Overrides:
connect
in classListReduction<T>
- Returns:
- Subscription that can be used to stop observing inputs.
-
getFrom
protected int getFrom(int max) - Overrides:
getFrom
in classListReduction<T>
-
getTo
protected int getTo(int max) - Overrides:
getTo
in classListReduction<T>
-