SnapshotStateMap

class SnapshotStateMap<K, V> : MutableMap<K, V> , StateObject

An implementation of MutableMap that can be observed and snapshot. This is the result type created by androidx.compose.mutableStateMapOf.

This class closely implements the same semantics as HashMap.

See also

Constructors

SnapshotStateMap
Link copied to clipboard
common
fun SnapshotStateMap()

Types

StateMapStateRecord
Link copied to clipboard
common
class StateMapStateRecord<K, V> : StateRecord
Implementation class of SnapshotStateMap.

Functions

clear
Link copied to clipboard
common
open override fun clear()
containsKey
Link copied to clipboard
common
open override fun containsKey(key: K): Boolean
containsValue
Link copied to clipboard
common
open override fun containsValue(value: V): Boolean
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
get
Link copied to clipboard
common
open operator override fun get(key: K): V?
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
isEmpty
Link copied to clipboard
common
open override fun isEmpty(): Boolean
mergeRecords
Link copied to clipboard
common
open fun mergeRecords(previous: StateRecord, current: StateRecord, applied: StateRecord): StateRecord?
Produce a merged state based on the conflicting state changes.
prependStateRecord
Link copied to clipboard
common
open override fun prependStateRecord(value: StateRecord)
Add a new state record to the beginning of a list.
put
Link copied to clipboard
common
open override fun put(key: K, value: V): V?
putAll
Link copied to clipboard
common
open override fun putAll(from: Map<out K, V>)
remove
Link copied to clipboard
common
open override fun remove(key: K): V?
toString
Link copied to clipboard
common
open fun toString(): String

Properties

entries
Link copied to clipboard
common
open override val entries: MutableSet<MutableMap.MutableEntry<K, V>>
firstStateRecord
Link copied to clipboard
common
open override var firstStateRecord: SnapshotStateMap.StateMapStateRecord<K, V>
The first state record in a linked list of state records.
keys
Link copied to clipboard
common
open override val keys: MutableSet<K>
size
Link copied to clipboard
common
open override val size: Int
values
Link copied to clipboard
common
open override val values: MutableCollection<V>