SingleAssign

class SingleAssign<T : Any>

Allows to assign a property just once. Further assignments result in IllegalStateException's.

Constructors

Link copied to clipboard
fun SingleAssign()

Functions

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

Returns the _value if it was set before. Else an error is thrown.

Link copied to clipboard
operator fun setValue(    thisRef: Any?,     property: KProperty<*>,     value: T)

Sets _value to the given value. If it was set before, an error is thrown.