StateBuilders.State.Builder


class StateBuilders.State.Builder


Builder for State

Summary

Public constructors

Creates an instance of Builder.

Public functions

StateBuilders.State.Builder
@RequiresSchemaVersion(major = 1, minor = 200)
<T : DynamicBuilders.DynamicType?> addKeyToValueMapping(
    sourceKey: AppDataKey<T!>,
    value: DynamicDataBuilders.DynamicDataValue<T!>
)

Adds an entry into any shared state between the provider and renderer.

StateBuilders.State.Builder
@RequiresSchemaVersion(major = 1, minor = 200)
addToStateMap(entries: Array<DynamicDataPair<Any!>>)

Adds the entries into any shared state between the provider and renderer.

StateBuilders.State

Builds an instance from accumulated values.

StateBuilders.State.Builder
@RequiresSchemaVersion(major = 1, minor = 200)
setStateMap(map: DynamicDataMap)

Sets the mapping for any shared state between the provider and renderer.

StateBuilders.State.Builder
@RequiresSchemaVersion(major = 1, minor = 200)
setStateMap(pairs: Array<DynamicDataPair<Any!>>)

Sets the mapping for any shared state between the provider and renderer.

Public constructors

Builder

Added in 1.0.0
Builder()

Creates an instance of Builder.

Public functions

addKeyToValueMapping

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun <T : DynamicBuilders.DynamicType?> addKeyToValueMapping(
    sourceKey: AppDataKey<T!>,
    value: DynamicDataBuilders.DynamicDataValue<T!>
): StateBuilders.State.Builder

Adds an entry into any shared state between the provider and renderer.

Throws
java.lang.IllegalStateException

if adding the new key/value will make the state larger than the allowed limit (getMaxStateEntryCount).

addToStateMap

@RequiresSchemaVersion(major = 1, minor = 200)
fun addToStateMap(entries: Array<DynamicDataPair<Any!>>): StateBuilders.State.Builder

Adds the entries into any shared state between the provider and renderer.

Throws
java.lang.IllegalArgumentException

if adding the new key/value will make the state larger than the allowed limit (getMaxStateEntryCount).

build

Added in 1.0.0
fun build(): StateBuilders.State

Builds an instance from accumulated values.

Throws
java.lang.IllegalStateException

if number of key/value pairs are greater than getMaxStateEntryCount.

setStateMap

Added in 1.3.0-alpha08
@RequiresSchemaVersion(major = 1, minor = 200)
fun setStateMap(map: DynamicDataMap): StateBuilders.State.Builder

Sets the mapping for any shared state between the provider and renderer. This method replaces the current state map with the entries from map.Any previous entries added using this setStateMap or addKeyToValueMapping will be overwritten.

Throws
java.lang.IllegalArgumentException

if the size of map is larger than the allowed limit (getMaxStateEntryCount).

setStateMap

@RequiresSchemaVersion(major = 1, minor = 200)
fun setStateMap(pairs: Array<DynamicDataPair<Any!>>): StateBuilders.State.Builder

Sets the mapping for any shared state between the provider and renderer. This method replaces the current state map with the entries from map. Any previous entries added using this setStateMap or addKeyToValueMapping will be overwritten.

Throws
java.lang.IllegalArgumentException

if the size of map is larger than the allowed limit (getMaxStateEntryCount).