January 2018
Intermediate to advanced
434 pages
14h 1m
English
As you can see, we have implemented the ReadWriteProperty interface in the delegated property, which basically means our variable will be of the var type. If you want it to be immutable, you can implement the ReadOnlyProperty interface.
The getValue function takes a reference to a class and a property's metadata. The setValue function, in turn, receives a set value. In case of immutable property (val), there will be only one getValue function.
Read now
Unlock full access