SubspaceSemanticsConfiguration

class SubspaceSemanticsConfiguration : SubspaceSemanticsPropertyReceiver, Iterable


Configuration of semantics properties for a spatial node.

Summary

Public constructors

Creates a new, empty SubspaceSemanticsConfiguration.

Public functions

operator Boolean
<T : Any?> contains(key: SemanticsPropertyKey<T>)

Returns true if the configuration contains the given key.

operator T
<T : Any?> get(key: SemanticsPropertyKey<T>)

Returns the value for the given key if present, or throws IllegalStateException if not.

T
<T : Any?> getOrElse(key: SemanticsPropertyKey<T>, defaultValue: () -> T)

Returns the value for the given key if present, or the result of defaultValue if not.

T?
<T : Any?> getOrElseNullable(
    key: SemanticsPropertyKey<T>,
    defaultValue: () -> T?
)

Returns the value for the given key if present, or the result of defaultValue if not.

T?

Returns the value for the given key if present, or null if not.

open operator Iterator<Map.Entry<SemanticsPropertyKey<*>, Any?>>
open operator Unit
<T : Any?> set(key: SemanticsPropertyKey<T>, value: T)

Sets the semantics property defined by key to value.

Public constructors

SubspaceSemanticsConfiguration

Added in 1.0.0-alpha16
SubspaceSemanticsConfiguration()

Creates a new, empty SubspaceSemanticsConfiguration.

Public functions

contains

Added in 1.0.0-alpha16
operator fun <T : Any?> contains(key: SemanticsPropertyKey<T>): Boolean

Returns true if the configuration contains the given key.

get

Added in 1.0.0-alpha16
operator fun <T : Any?> get(key: SemanticsPropertyKey<T>): T

Returns the value for the given key if present, or throws IllegalStateException if not.

getOrElse

Added in 1.0.0-alpha16
fun <T : Any?> getOrElse(key: SemanticsPropertyKey<T>, defaultValue: () -> T): T

Returns the value for the given key if present, or the result of defaultValue if not.

getOrElseNullable

Added in 1.0.0-alpha16
fun <T : Any?> getOrElseNullable(
    key: SemanticsPropertyKey<T>,
    defaultValue: () -> T?
): T?

Returns the value for the given key if present, or the result of defaultValue if not.

getOrNull

Added in 1.0.0-alpha16
fun <T : Any?> getOrNull(key: SemanticsPropertyKey<T>): T?

Returns the value for the given key if present, or null if not.

iterator

Added in 1.0.0-alpha16
open operator fun iterator(): Iterator<Map.Entry<SemanticsPropertyKey<*>, Any?>>

set

open operator fun <T : Any?> set(key: SemanticsPropertyKey<T>, value: T): Unit

Sets the semantics property defined by key to value.

Parameters
key: SemanticsPropertyKey<T>

The property key to set.

value: T

The value to assign to the property.