SemanticsConfiguration

class SemanticsConfiguration : SemanticsPropertyReceiver


Describes the semantics information associated with the owning component.

Summary

Public constructors

Public functions

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

Retrieves the value for the given property, if one has been set, If a value has not been set, throws IllegalStateException

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

Retrieves the value for the given property, if one has been set, If a value has not been set, returns the provided default value.

T?

Retrieves the value for the given property, if one has been set, If a value has not been set, returns null

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

Public constructors

SemanticsConfiguration

Added in 1.0.0
SemanticsConfiguration()

Public functions

get

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

Retrieves the value for the given property, if one has been set, If a value has not been set, throws IllegalStateException

getOrElseNullable

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

Retrieves the value for the given property, if one has been set, If a value has not been set, returns the provided default value.

getOrNull

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

Retrieves the value for the given property, if one has been set, If a value has not been set, returns null

set

Added in 1.1.0-alpha01
open operator fun <T : Any?> set(key: SemanticsPropertyKey<T>, value: T): Unit