open class DynamicDataMap

Known direct subclasses
MutableDynamicDataMap

A mutable heterogeneous map of DynamicType keys to their corresponding values.


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

Summary

Public functions

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

Public properties

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 functions

contains

inline operator fun <T : DynamicBuilders.DynamicType> contains(key: DynamicDataKey<T>): Boolean

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

Parameters
<T : DynamicBuilders.DynamicType>

the type to match the value's type against. Dynamic and raw types can be used interchangeably. For example DynamicInt32 and Int both return true if the associated value is of DynamicInt32 type.

key: DynamicDataKey<T>

the key to check for.

contains

Added in 1.3.0-alpha08
fun <T : DynamicBuilders.DynamicType> contains(
    key: DynamicDataKey<T>,
    type: Class<T>
): Boolean

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

Parameters
key: DynamicDataKey<T>

the key to check for.

type: Class<T>

the type to match the value's type against. Dynamic and raw types can be used interchangeably. For example DynamicInt32 and Int both return true if the associated value is of DynamicInt32 type.

equals

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

get

Added in 1.3.0-alpha08
operator fun get(key: DynamicDataKey<DynamicBuilders.DynamicBool>): Boolean?

Gets the boolean value mapped to key. If there isn't any mapped value for key, returns null.

Throws
kotlin.IllegalStateException

if a non-boolean value is stored with the same name as key.

get

Added in 1.3.0-alpha08
operator fun get(key: DynamicDataKey<DynamicBuilders.DynamicColor>): Color?

Gets the color value mapped to key. If there isn't any mapped value for key, returns null.

Throws
kotlin.IllegalStateException

if a non-color value is stored with the same name as key.

get

Added in 1.3.0-alpha08
operator fun get(key: DynamicDataKey<DynamicBuilders.DynamicDuration>): Duration?

Gets the Duration value mapped to key. If there isn't any mapped value for key, returns null.

Throws
kotlin.IllegalStateException

if a non-Duration value is stored with the same name as key.

get

Added in 1.3.0-alpha08
operator fun get(key: DynamicDataKey<DynamicBuilders.DynamicFloat>): Float?

Gets the float value mapped to key. If there isn't any mapped value for key, returns null.

Throws
kotlin.IllegalArgumentException

if the key is not stored in the map.

get

Added in 1.3.0-alpha08
operator fun get(key: DynamicDataKey<DynamicBuilders.DynamicInstant>): Instant?

Gets the Instant value mapped to key. If there isn't any mapped value for key, returns null.

Throws
kotlin.IllegalStateException

if a non-Instant value is stored with the same name as key.

get

Added in 1.3.0-alpha08
operator fun get(key: DynamicDataKey<DynamicBuilders.DynamicInt32>): Int?

Gets the integer value mapped to key. If there isn't any mapped value for key, returns null.

Throws
kotlin.IllegalStateException

if a non-integer value is stored with the same name as key.

get

Added in 1.3.0-alpha08
operator fun get(key: DynamicDataKey<DynamicBuilders.DynamicString>): String?

Gets the string value mapped to key. If there isn't any mapped value for key, returns null.

Throws
kotlin.IllegalStateException

if a non-string value is stored with the same name as key.

hashCode

open fun hashCode(): Int

plus

Added in 1.3.0-alpha08
operator fun plus(rhs: DynamicDataMap): DynamicDataMap

toString

open fun toString(): String

Public properties

entries

Added in 1.3.0-alpha08
val entriesSet<Map.Entry<DynamicDataKey<DynamicBuilders.DynamicType>, DynamicDataBuilders.DynamicDataValue<DynamicBuilders.DynamicType>>>

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

keys

Added in 1.3.0-alpha08
val keysSet<DynamicDataKey<DynamicBuilders.DynamicType>>

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

size

Added in 1.3.0-alpha08
val sizeInt

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

values

Added in 1.3.0-alpha08
val valuesCollection<DynamicDataBuilders.DynamicDataValue<DynamicBuilders.DynamicType>>

Returns a read-only Collection of all values in this map. Note that this collection may contain duplicate values.