kapsule-core / space.traversal.kapsule / Delegate / Optional

Optional

class Optional<in M, T> : Delegate<M, T>

Delegate for optional (nullable) values.

Constructors

<init>

Optional(initializer: M.() -> T?)

Delegate for optional (nullable) values.

Inherited Properties

value

var value: T?

Functions

getValue

operator fun getValue(thisRef: Any?, property: KProperty<*>): T?

Delegate for value reads.

setValue

operator fun setValue(thisRef: Any?, property: KProperty<*>, t: T?): Unit

Delegate for value writes.