State

interface State<out S : State<S>>

Something that is a possible state of something else.

Inheritors

Functions

Link copied to clipboard
abstract fun <T : Comparable<T>> getProperty(property: Property<T>): T?

Gets the value for the given property, or returns null if there is no value for the given property.

Link copied to clipboard
abstract fun hasProperty(property: Property<*>): Boolean

Checks if the given property has a value on this state.

Link copied to clipboard
abstract fun <T : Comparable<T>> requireProperty(property: Property<T>): T

Gets the value for the given property, or throws an IllegalArgumentException if there is no value for the given property.

Link copied to clipboard
abstract fun <T : Comparable<T>> setProperty(property: Property<T>, value: T): S

Sets the value for the given property to the given value and returns the resulting state.

Properties

Link copied to clipboard
@get:JvmName(name = "availableProperties")
abstract val availableProperties: @Unmodifiable Set<Property<*>>

All of the properties that can be set on this state.

Link copied to clipboard
@get:JvmName(name = "properties")
abstract val properties: @Unmodifiable Map<Property<*>, Comparable<*>>

All of the properties that are currently set on this state.