January 2018
Intermediate to advanced
434 pages
14h 1m
English
The delegation of a property looks like this:
class Delegate { operator fun getValue( thisRef: Any?, property: KProperty<*> ): String { // return value } operator fun setValue( thisRef: Any?, property: KProperty<*>, value: String ) { // assign }}
The read operation calls the getValue method, and the write operation calls setValue.
There are three modes of evaluation of lazy properties:
Read now
Unlock full access