MutableDynamicDataMap
public final class MutableDynamicDataMap extends DynamicDataMap
| java.lang.Object | ||
| ↳ | androidx.wear.protolayout.expression.DynamicDataMap | |
| ↳ | androidx.wear.protolayout.expression.MutableDynamicDataMap |
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 |
|---|
MutableDynamicDataMap(@NonNull DynamicDataPair<@NonNull ?>... pairs) |
Inherited methods |
||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public constructors
MutableDynamicDataMap
public MutableDynamicDataMap(@NonNull DynamicDataPair<@NonNull ?>... pairs)
Public methods
putAll
public final void putAll(@NonNull DynamicDataMap other)
Adds all key/values from other to this map. Potentially overwriting any common key.
set
@RequiresSchemaVersion(major = 1, minor = 200)
public final void set(
@NonNull DynamicDataKey<@NonNull DynamicBuilders.DynamicBool> key,
boolean value
)
Associates a boolean value with a DynamicBool in this map.
| Parameters | |
|---|---|
@NonNull DynamicDataKey<@NonNull DynamicBuilders.DynamicBool> key |
represent a key that other APIs can use to reference |
boolean value |
is the static value to use for resolving references to |
set
@RequiresSchemaVersion(major = 1, minor = 200)
public final void set(
@NonNull DynamicDataKey<@NonNull DynamicBuilders.DynamicColor> key,
@NonNull Color value
)
Associates a color value with a DynamicColor in this map.
| Parameters | |
|---|---|
@NonNull DynamicDataKey<@NonNull DynamicBuilders.DynamicColor> key |
represent a key that other APIs can use to reference |
@NonNull Color value |
is the static value to use for resolving references to |
set
@RequiresSchemaVersion(major = 1, minor = 300)
public final void set(
@NonNull DynamicDataKey<@NonNull DynamicBuilders.DynamicDuration> key,
@NonNull Duration value
)
Associates a Duration with a DynamicDuration in this map.
| Parameters | |
|---|---|
@NonNull DynamicDataKey<@NonNull DynamicBuilders.DynamicDuration> key |
represent a key that other APIs can use to reference |
@NonNull Duration value |
is the static value to use for resolving references to |
set
public final void <T extends DynamicBuilders.DynamicType> set(
@NonNull DynamicDataKey<@NonNull T> key,
@NonNull DynamicDataBuilders.DynamicDataValue<@NonNull T> value
)
Associates value with key in this map.
| Parameters | |
|---|---|
@NonNull DynamicDataKey<@NonNull T> key |
represent a key that other APIs can use to reference |
@NonNull DynamicDataBuilders.DynamicDataValue<@NonNull T> value |
is the static value to use for resolving references to |
set
@RequiresSchemaVersion(major = 1, minor = 200)
public final void set(
@NonNull DynamicDataKey<@NonNull DynamicBuilders.DynamicFloat> key,
float value
)
Associates a float value with a DynamicFloat in this map.
| Parameters | |
|---|---|
@NonNull DynamicDataKey<@NonNull DynamicBuilders.DynamicFloat> key |
represent a key that other APIs can use to reference |
float value |
is the static value to use for resolving references to |
set
@RequiresSchemaVersion(major = 1, minor = 300)
public final void set(
@NonNull DynamicDataKey<@NonNull DynamicBuilders.DynamicInstant> key,
@NonNull Instant value
)
Associates a Instant with a DynamicInstant in this map.
| Parameters | |
|---|---|
@NonNull DynamicDataKey<@NonNull DynamicBuilders.DynamicInstant> key |
represent a key that other APIs can use to reference |
@NonNull Instant value |
is the static value to use for resolving references to |
set
@RequiresSchemaVersion(major = 1, minor = 200)
public final void set(
@NonNull DynamicDataKey<@NonNull DynamicBuilders.DynamicInt32> key,
int value
)
Associates a integer value with a DynamicInt32 in this map.
| Parameters | |
|---|---|
@NonNull DynamicDataKey<@NonNull DynamicBuilders.DynamicInt32> key |
represent a key that other APIs can use to reference |
int value |
is the static value to use for resolving references to |
set
@RequiresSchemaVersion(major = 1, minor = 200)
public final void set(
@NonNull DynamicDataKey<@NonNull DynamicBuilders.DynamicString> key,
@NonNull String value
)
Associates a string value with a DynamicString in this map.
| Parameters | |
|---|---|
@NonNull DynamicDataKey<@NonNull DynamicBuilders.DynamicString> key |
represent a key that other APIs can use to reference |
@NonNull String value |
is the static value to use for resolving references to |