StateBuilders.State.Builder


public final class StateBuilders.State.Builder


Builder for State

Summary

Public constructors

Creates an instance of Builder.

Public methods

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

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

@NonNull StateBuilders.State

Builds an instance from accumulated values.

Public constructors

Builder

Added in 1.0.0
public Builder()

Creates an instance of Builder.

Public methods

addKeyToValueMapping

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

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
public @NonNull StateBuilders.State build()

Builds an instance from accumulated values.

Throws
java.lang.IllegalStateException

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