Delegates
Property delegates, lazy, observable and class delegation.
1
kotlin delegates
2Property Delegates in Kotlin
Property delegation moves getter/setter logic to delegate object. A Kotlin example with source code and sample output.
kotlin delegates
3lazy Delegate in Kotlin
lazy initializes value only on first access. A Kotlin example with source code and sample output.
kotlin delegates
4Observable Delegate in Kotlin
Delegates.observable triggers callback when property value changes. A Kotlin example with source code and sample output.
kotlin delegates
5Delegated Properties Overview in Kotlin
Kotlin standard library provides lazy, observable and vetoable delegates. A Kotlin example with source code and sample output.
kotlin delegates
Class Delegation in Kotlin
Class delegation forwards interface calls to another object. A Kotlin example with source code and sample output.