constant

open fun <T> constant(t: T): GetSetter<T>(source)

Create a constant GetSetter. This GetSetter will always throw when set is called.

Return

a constant GetSetter

Parameters

t

the value that this GetSetter will always return

<T>

the type of the value this GetSetter will hold