Top Fields Constructors Methods
org.reactfx.value

public abstract Class ValBase<T>

extends ObservableBase<Consumer<? super T>, T>
implements ProperVal<T>
Class Inheritance
All Implemented Interfaces
org.reactfx.value.ProperVal, org.reactfx.ProperObservable, org.reactfx.Observable, org.reactfx.value.Val, javafx.beans.value.ObservableValue, javafx.beans.Observable
Known Direct Subclasses
org.reactfx.value.ValWrapper, org.reactfx.SuspendableBoolean, org.reactfx.collection.ListReduction, org.reactfx.value.AnimatedVal, org.reactfx.value.FlatMapped, org.reactfx.value.MappedVal, org.reactfx.value.OrElse, org.reactfx.value.OrElseConst, org.reactfx.value.SimpleVar
Imports
java.util.function.Consumer, org.reactfx.ObservableBase, .Subscription

Field Summary

Modifier and TypeField and Description
private boolean
private T

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected abstract T
protected abstract Subscription

Returns:

Subscription that can be used to stop observing inputs.
connect
()

Implementation of this method should start observing inputs.

public final T
getValue()

Implements javafx.beans.value.ObservableValue.getValue.

Returns the current value of this ObservableValue

protected final void
protected final void
newObserver(Consumer<? super T> oldValueObserver)

Overrides org.reactfx.ObservableBase.newObserver.

Called for each new observer.

protected final Subscription
observeInputs()

Implements abstract org.reactfx.ObservableBase.observeInputs.

Starts observing this observable's input(s), if any.

Inherited from org.reactfx.ObservableBase:
addObserverenqueueNotificationsequalsforEachObservergetObserverCounthashCodeisObservingInputsnotifyObserversnotifyObserversobserveremoveObservertoString

Field Detail

validback to summary
private boolean valid
valueback to summary
private T value

Constructor Detail

ValBaseback to summary
public ValBase()

Method Detail

computeValueback to summary
protected abstract T computeValue()
connectback to summary
protected abstract Subscription connect()

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 call invalidate() to notify observers of this Val. By the time of calling invalidate(), the input observer must have already updated any internal state of this Val, so that a subsequent call to computeValue() returns the current value of this Val.

Returns:Subscription

Subscription that can be used to stop observing inputs.

getValueback to summary
public final T getValue()

Implements javafx.beans.value.ObservableValue.getValue.

Doc from javafx.beans.value.ObservableValue.getValue.

Returns the current value of this ObservableValue

Annotations
@Override
invalidateback to summary
protected final void invalidate()
newObserverback to summary
protected final void newObserver(Consumer<? super T> oldValueObserver)

Overrides org.reactfx.ObservableBase.newObserver.

Doc from org.reactfx.ObservableBase.newObserver.

Called for each new observer. Overriding this method is a convenient way for subclasses to handle this event, for example to publish some initial events.

This method is called after the observeInputs() method.

Annotations
@Override
observeInputsback to summary
protected final Subscription observeInputs()

Implements abstract org.reactfx.ObservableBase.observeInputs.

Doc from org.reactfx.ObservableBase.observeInputs.

Starts 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 before newObserver(Object) is called for the first observer.

Annotations
@Override