Observable Mutable Map
A class that represents an observable, mutable map. Allows observation of map changes, including addition, removal, modifications of key-value pairs, and observation of particular keys for their value changes.
Type Parameters
The type of keys maintained by the map.
The type of mapped values.
Types
Simple utility function for the ObservableMaps.
Properties
Functions
Replaces the whole content of this map with from, like doing a clear followed by a putAll, * but without notifying per-key observers for keys that remain present (unless their value changes).
Retrieves the current value of the observable if present, or null if no value is available.
Retrieves the observable representation of the value associated with the specified key in the observable map. The resulting observable emits updates whenever the value for the given key changes, is added, or is removed.
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.
Updates the value associated with the given key in the map by applying the provided transformation function. If the key does not exist or its current value is null, no operation is performed, and null is returned.
Inserts or updates a key-value pair in the ObservableMutableMap. If the key already exists, its value is updated using the provided transformation function. If the key does not exist, a new key-value pair is added with the value derived from the transformation function.