Mutable Reactive Collection
A foundational interface for mutable collections that expose their state as a StateFlow.
This allows observers to reactively receive updates whenever the collection is modified. The emitted value is an immutable snapshot of the collection at the time of modification.
Parameters
The type of elements in the collection.
The underlying mutable collection type that this interface wraps (e.g., MutableList, MutableSet, MutableMap).
Inheritors
Functions
Returns the collection's content as a StateFlow of an immutable collection IC type.
Executes a block of modifications on the underlying mutable collection and notifies observers only once after the block has completed.
Executes a suspending block of modifications on the underlying mutable collection and notifies observers only once after the block has completed.