O Google tem o compromisso de promover a igualdade racial para as comunidades negras. Saiba como.

SnapshotStateMap

@Stable class SnapshotStateMap<K, V> : MutableMap<K, V>, StateObject
kotlin.Any
   ↳ androidx.compose.runtime.snapshots.SnapshotStateMap

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

This class closely implements the same semantics as HashMap.

Summary

Public constructors

An implementation of MutableMap that can be observed and snapshot.

Public methods
Unit

Boolean
containsKey(key: K)

Boolean
containsValue(value: V)

V?
get(key: K)

Boolean

Unit

Add a new state record to the beginning of a list.

V?
put(key: K, value: V)

Unit
putAll(from: Map<out K, V>)

V?
remove(key: K)

Inherited functions
Properties
MutableSet<MutableEntry<K, V>>

StateRecord

The first state record in a linked list of state records.

MutableSet<K>

Int

MutableCollection<V>

Public constructors

<init>

SnapshotStateMap()

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

This class closely implements the same semantics as HashMap.

Public methods

clear

fun clear(): Unit

containsKey

fun containsKey(key: K): Boolean

containsValue

fun containsValue(value: V): Boolean

get

fun get(key: K): V?

isEmpty

fun isEmpty(): Boolean

prependStateRecord

fun prependStateRecord(value: StateRecord): Unit

Add a new state record to the beginning of a list. After this call firstStateRecord should be value.

put

fun put(
    key: K,
    value: V
): V?

putAll

fun putAll(from: Map<out K, V>):