NotNullOrDefault

class NotNullOrDefault<T : Any>(val defaultValue: T) : ReadWriteProperty<Any, T> (source)

Getting a non-null variable. If no other value is set, the defaultValue will be used as the value of the variable and no changes are allowed.

Since

0.0.6

Constructors

Link copied to clipboard
constructor(defaultValue: T)

Properties

Link copied to clipboard
private val defaultValue: T
Link copied to clipboard
private var mValue: T?

Functions

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