Attaches a function to listen to values fired against this Observable.
Attaches a function to listen to values fired against this Observable.
function listener
the supplied function. This reference is useful for detaching the function later
Works similarly to attach
, but also references the previous value that was fired.
Works similarly to attach
, but also references the previous value that was fired. This is useful when you need
to handle changes, not just new values.
the ChangeListener
the listener attached. This can be passed to detach
to remove this listener
Clears all attached observers from this Observable.
Clears all attached observers from this Observable.
Detaches a function from listening to this Observable.
Detaches a function from listening to this Observable.
function listener that was previously attached
Cleans up all cross references in preparation for releasing for GC.
Cleans up all cross references in preparation for releasing for GC.
Returns a Future[T] that represents the value of the next firing of this Observable.
Returns a Future[T] that represents the value of the next firing of this Observable.
the condition under which the listener will be invoked. Defaults to always return true.
Direct attachment of a listener.
Direct attachment of a listener.
the listener to attach
the same listener supplied
Works like attach
, but doesn't receive the fired value.
Works like attach
, but doesn't receive the fired value.
function to invoke on fire
listener
Invokes the listener only one time and then detaches itself.
Invokes the listener only one time and then detaches itself. If supplied, the condition filters the scenarios in which the listener will be invoked.
the function listener
the condition under which the listener will be invoked. Defaults to always return true.
Val, as the name suggests, is like a Scala
val
. This represents an immutable value that is set in the first place and then not modified. However, since the value set may be built fromObservables
, the generated value may change over time as its dependencies are modified. This class isObservable
and will only fire changes if the underlying value is derived from one or moreObservables
.the type of value retained by this
State