ObservableMutableMap
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.
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.
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.