Browse topics
Functional Kotlin
Delegates
Property delegates, lazy, observable and class delegation.
kotlin delegatesProperty Delegates in KotlinProperty delegation moves getter/setter logic to delegate object. A Kotlin example with source code and sample output.kotlin delegateslazy Delegate in Kotlinlazy initializes value only on first access. A Kotlin example with source code and sample output.kotlin delegatesObservable Delegate in KotlinDelegates.observable triggers callback when property value changes. A Kotlin example with source code and sample output.kotlin delegatesDelegated Properties Overview in KotlinKotlin standard library provides lazy, observable and vetoable delegates. A Kotlin example with source code and sample output.kotlin delegatesClass Delegation in KotlinClass delegation forwards interface calls to another object. A Kotlin example with source code and sample output.
Related topics
Lambda Expressions Lambda syntax, parameters, return values and anonymous functions. Higher Order Functions Functions as parameters, inline functions and return types. Scope Functions let, run, with, apply and also scope functions explained. Generics Generic functions, classes, constraints, variance and star projection. Extension Functions Add new behaviour to existing types with Kotlin extension functions and properties.