Top Fields Constructors Methods
org.reactfx

pack-priv Class StreamBinding<T>

extends ObservableValueBase<T>
implements Binding<T>
Class Inheritance
All Implemented Interfaces
javafx.beans.binding.Binding, javafx.beans.value.ObservableValue, javafx.beans.Observable
Imports
javafx.beans.binding.Binding, javafx.beans.value.ObservableValueBase, javafx.collections.ObservableList

Field Summary

Modifier and TypeField and Description
private final Subscription
private T

Constructor Summary

AccessConstructor and Description
public
StreamBinding(EventStream<T> input, T initialValue)

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Implements javafx.beans.binding.Binding.dispose.

Signals to the Binding that it will not be used anymore and any references can be removed.

public ObservableList<?>
getDependencies()

Implements javafx.beans.binding.Binding.getDependencies.

Returns the dependencies of a binding in an unmodifiable javafx.collections.ObservableList.

public T
getValue()

Implements javafx.beans.value.ObservableValue.getValue.

Returns the current value of this ObservableValue

public void
invalidate()

Implements javafx.beans.binding.Binding.invalidate.

Mark a binding as invalid.

public boolean
isValid()

Implements javafx.beans.binding.Binding.isValid.

Checks if a binding is valid.

Inherited from javafx.beans.value.ObservableValueBase:
addListeneraddListenerfireValueChangedEventremoveListenerremoveListener

Field Detail

subscriptionback to summary
private final Subscription subscription
valueback to summary
private T value

Constructor Detail

StreamBindingback to summary
public StreamBinding(EventStream<T> input, T initialValue)

Method Detail

disposeback to summary
public void dispose()

Implements javafx.beans.binding.Binding.dispose.

Doc from javafx.beans.binding.Binding.dispose.

Signals to the Binding that it will not be used anymore and any references can be removed. A call of this method usually results in the binding stopping to observe its dependencies by unregistering its listener(s). The implementation is optional.

All bindings in our implementation use instances of javafx.beans.WeakInvalidationListener, which means usually a binding does not need to be disposed. But if you plan to use your application in environments that do not support WeakReferences you have to dispose unused Bindings to avoid memory leaks.

Annotations
@Override
getDependenciesback to summary
public ObservableList<?> getDependencies()

Implements javafx.beans.binding.Binding.getDependencies.

Doc from javafx.beans.binding.Binding.getDependencies.

Returns the dependencies of a binding in an unmodifiable javafx.collections.ObservableList. The implementation is optional. The main purpose of this method is to support developers during development. It allows to explore and monitor dependencies of a binding during runtime.

Because this method should not be used in production code, it is recommended to implement this functionality as sparse as possible. For example if the dependencies do not change, each call can generate a new ObservableList, avoiding the necessity to store the result.

Annotations
@Override
getValueback to summary
public 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
public void invalidate()

Implements javafx.beans.binding.Binding.invalidate.

Doc from javafx.beans.binding.Binding.invalidate.

Mark a binding as invalid. This forces the recalculation of the value of the Binding next time it is request.

Annotations
@Override
isValidback to summary
public boolean isValid()

Implements javafx.beans.binding.Binding.isValid.

Doc from javafx.beans.binding.Binding.isValid.

Checks if a binding is valid.

Annotations
@Override