Mutable Observable
A MutableObservable represents an extension of the Observable interface, designed to maintain mutable state and notify its observers when the state changes. Updates are mainly performed thanks to the update function.
Type Parameters
The type of the value being observed and modified.
Properties
Functions
Retrieves the current value of the observable if present, or null if no value is available.
Transforms the current observable into a new observable by applying the specified transformation function to its emitted values.
Combines the current observable with another observable, producing a new observable that emits values derived by applying the provided merge function to the current values of both observables.
Registers callback to be invoked with every new value of this observable, and right away with the current one if notifyOnRegistration.
Maps the current value of this Observable to an inner observable through transform, and mirrors the inner observable of the most recent value only: whenever this observable emits, the previous inner observable is unsubscribed and the new one is followed.
Handy method to update the optionalOption contents of this MutableObservable. Applies the given function to the value contained by the underlying Option, if it is empty nothing is computed.