class MutableDynamicDataMap : DynamicDataMap


A mutable heterogeneous map of DynamicType keys to their corresponding values. This (and DynamicDataMap) act like MutableMap (and Map), but with type safety for key and value pairs.

Summary

Public constructors

Public functions

Unit

Adds all key/values from other to this map.

operator Unit
@RequiresSchemaVersion(major = 1, minor = 200)
set(key: DynamicDataKey<DynamicBuilders.DynamicBool>, value: Boolean)

Associates a boolean value with a DynamicBool in this map.

operator Unit
@RequiresSchemaVersion(major = 1, minor = 200)
set(key: DynamicDataKey<DynamicBuilders.DynamicColor>, value: Color)

Associates a color value with a DynamicColor in this map.

operator Unit
@RequiresSchemaVersion(major = 1, minor = 300)
set(
    key: DynamicDataKey<DynamicBuilders.DynamicDuration>,
    value: Duration
)

Associates a Duration with a DynamicDuration in this map.

operator Unit

Associates value with key in this map.

operator Unit
@RequiresSchemaVersion(major = 1, minor = 200)
set(key: DynamicDataKey<DynamicBuilders.DynamicFloat>, value: Float)

Associates a float value with a DynamicFloat in this map.

operator Unit
@RequiresSchemaVersion(major = 1, minor = 300)
set(key: DynamicDataKey<DynamicBuilders.DynamicInstant>, value: Instant)

Associates a Instant with a DynamicInstant in this map.

operator Unit
@RequiresSchemaVersion(major = 1, minor = 200)
set(key: DynamicDataKey<DynamicBuilders.DynamicInt32>, value: Int)

Associates a integer value with a DynamicInt32 in this map.

operator Unit
@RequiresSchemaVersion(major = 1, minor = 200)
set(key: DynamicDataKey<DynamicBuilders.DynamicString>, value: String)

Associates a string value with a DynamicString in this map.

Inherited functions

From androidx.wear.protolayout.expression.DynamicDataMap
inline operator Boolean

Returns true if this map contains the specified key and it is associated with the specified type T.

Boolean
<T : DynamicBuilders.DynamicType> contains(
    key: DynamicDataKey<T>,
    type: Class<T>
)

Returns true if this map contains the specified key and it is associated with the specified type.

open operator Boolean
equals(other: Any?)
operator Boolean?

Gets the boolean value mapped to key.

operator Color?

Gets the color value mapped to key.

operator Duration?

Gets the Duration value mapped to key.

operator Float?

Gets the float value mapped to key.

operator Instant?

Gets the Instant value mapped to key.

operator Int?

Gets the integer value mapped to key.

operator String?

Gets the string value mapped to key.

open Int
operator DynamicDataMap
open String

Inherited properties

From androidx.wear.protolayout.expression.DynamicDataMap
Set<Map.Entry<DynamicDataKey<DynamicBuilders.DynamicType>, DynamicDataBuilders.DynamicDataValue<DynamicBuilders.DynamicType>>>

Returns a read-only Set of all key/value pairs in this map.

Set<DynamicDataKey<DynamicBuilders.DynamicType>>

Returns a read-only Set of all keys in this map.

Int

Returns the number of key/value pairs in the map.

Collection<DynamicDataBuilders.DynamicDataValue<DynamicBuilders.DynamicType>>

Returns a read-only Collection of all values in this map.

Public constructors

MutableDynamicDataMap

Added in 1.3.0-alpha08
MutableDynamicDataMap(vararg pairs: DynamicDataPair<*>)

Public functions

putAll

Added in 1.3.0-alpha08
fun putAll(other: DynamicDataMap): Unit

Adds all key/values from other to this map. Potentially overwriting any common key.

set

Added in 1.3.0-alpha08
@RequiresSchemaVersion(major = 1, minor = 200)
operator fun set(key: DynamicDataKey<DynamicBuilders.DynamicBool>, value: Boolean): Unit

Associates a boolean value with a DynamicBool in this map.

Parameters
key: DynamicDataKey<DynamicBuilders.DynamicBool>

represent a key that other APIs can use to reference values value.

value: Boolean

is the static value to use for resolving references to key.

set

Added in 1.3.0-alpha08
@RequiresSchemaVersion(major = 1, minor = 200)
operator fun set(key: DynamicDataKey<DynamicBuilders.DynamicColor>, value: Color): Unit

Associates a color value with a DynamicColor in this map.

Parameters
key: DynamicDataKey<DynamicBuilders.DynamicColor>

represent a key that other APIs can use to reference values value.

value: Color

is the static value to use for resolving references to key.

set

Added in 1.3.0-alpha08
@RequiresSchemaVersion(major = 1, minor = 300)
operator fun set(
    key: DynamicDataKey<DynamicBuilders.DynamicDuration>,
    value: Duration
): Unit

Associates a Duration with a DynamicDuration in this map.

Parameters
key: DynamicDataKey<DynamicBuilders.DynamicDuration>

represent a key that other APIs can use to reference values value.

value: Duration

is the static value to use for resolving references to key.

set

Added in 1.3.0-alpha08
operator fun <T : DynamicBuilders.DynamicType> set(
    key: DynamicDataKey<T>,
    value: DynamicDataBuilders.DynamicDataValue<T>
): Unit

Associates value with key in this map.

Parameters
key: DynamicDataKey<T>

represent a key that other APIs can use to reference values value.

value: DynamicDataBuilders.DynamicDataValue<T>

is the static value to use for resolving references to key.

set

Added in 1.3.0-alpha08
@RequiresSchemaVersion(major = 1, minor = 200)
operator fun set(key: DynamicDataKey<DynamicBuilders.DynamicFloat>, value: Float): Unit

Associates a float value with a DynamicFloat in this map.

Parameters
key: DynamicDataKey<DynamicBuilders.DynamicFloat>

represent a key that other APIs can use to reference values value.

value: Float

is the static value to use for resolving references to key.

set

Added in 1.3.0-alpha08
@RequiresSchemaVersion(major = 1, minor = 300)
operator fun set(key: DynamicDataKey<DynamicBuilders.DynamicInstant>, value: Instant): Unit

Associates a Instant with a DynamicInstant in this map.

Parameters
key: DynamicDataKey<DynamicBuilders.DynamicInstant>

represent a key that other APIs can use to reference values value.

value: Instant

is the static value to use for resolving references to key.

set

Added in 1.3.0-alpha08
@RequiresSchemaVersion(major = 1, minor = 200)
operator fun set(key: DynamicDataKey<DynamicBuilders.DynamicInt32>, value: Int): Unit

Associates a integer value with a DynamicInt32 in this map.

Parameters
key: DynamicDataKey<DynamicBuilders.DynamicInt32>

represent a key that other APIs can use to reference values value.

value: Int

is the static value to use for resolving references to key.

set

Added in 1.3.0-alpha08
@RequiresSchemaVersion(major = 1, minor = 200)
operator fun set(key: DynamicDataKey<DynamicBuilders.DynamicString>, value: String): Unit

Associates a string value with a DynamicString in this map.

Parameters
key: DynamicDataKey<DynamicBuilders.DynamicString>

represent a key that other APIs can use to reference values value.

value: String

is the static value to use for resolving references to key.