detekt-api
1.21.0-RC2

# SingleAssign

class SingleAssign < T : Any >
Content copied to clipboard

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

## Constructors

SingleAssign
Link copied to clipboard
fun SingleAssign ()
Content copied to clipboard

## Functions

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

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

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

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