FlowMap

interface FlowMap<K : Any, V : Any> : MapFlow<K, V> , Map<K, V> (source)

Exposes the current state and future mutations to specific keys (via valueFlow), or the map as a whole (via asFlow).

See also

Inheritors

Properties

Link copied to clipboard
abstract val entries: Set<Map.Entry<K, V>>
Link copied to clipboard
abstract val keys: Set<K>
Link copied to clipboard
abstract val size: Int
Link copied to clipboard
abstract val values: Collection<V>

Functions

Link copied to clipboard
abstract fun asFlow(predicate: (K, V) -> Boolean? = null): Flow<MapEvent<K, V>>

A Flow of events that can be used to reconstitute the current and future state of the FlowMap.

Link copied to clipboard
abstract fun asMap(): PersistentMap<K, V>

A copy of the map at this point in time

Link copied to clipboard
abstract fun containsKey(key: K): Boolean
Link copied to clipboard
abstract fun containsValue(value: V): Boolean
Link copied to clipboard
abstract operator fun get(key: K): V?
Link copied to clipboard
abstract fun isEmpty(): Boolean
Link copied to clipboard

Creates a copy of the provided map as a new MutableFlowMap.

Link copied to clipboard
abstract fun valueFlow(key: K): Flow<V?>

A Flow of the latest value for the provided key or null if no value is present.