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

Builds an instance from accumulated values.

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).

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.