Top Description Methods
org.reactfx

public Interface Observable<O>

Known Direct Subinterfaces
org.reactfx.ProperObservable, org.reactfx.collection.LiveList, org.reactfx.value.Val, org.reactfx.EventStream
Known Direct Implementers
org.reactfx.ProxyObservable, org.reactfx.RigidObservable
Type Parameters
<O>
observer type accepted by this Observable
Imports
javafx.beans.InvalidationListener, javafx.beans.value.ChangeListener, org.reactfx.value.Val

Anything that can be observed, that is have an observer added and removed. Each Observable has one canonical observer type, which can be added by the addObserver(Object) method and removed by the removeObserver(Object) method, or added by the observe(Object) method and removed by the returned Subscription. In specific subtypes, methods for adding/removing canonical observers may have aliases that are more descriptive for the specific type, for example, in EventStream, observe(Object) is aliased as EventStream#subscribe(java.util.function.Consumer), or in Val, addObserver(Object) is aliased as Val#addInvalidationObserver(java.util.function.Consumer). In addition to the canonical observer, subtypes may support adding other observer types. These other observers will be wrapped to "look like" a canonical observer. For example, the canonical observer for Val<T> is an invalidation observer, which is of type Consumer<? super T>, which accepts the invalidated value. In addition to this canonical observer, Val also supports InvalidationListeners and ChangeListeners.

Method Summary

Modifier and TypeMethod and Description
public void
addObserver(O observer)

public default Subscription
observe(O observer)

public void
removeObserver(O observer)

Method Detail

addObserverback to summary
public void addObserver(O observer)
observeback to summary
public default Subscription observe(O observer)
removeObserverback to summary
public void removeObserver(O observer)