Pustaka Taratsa
KOTLIN: Delegation

KOTLIN: Delegation

Penulis: Onno Widodo Purbo

Sumber: https://www.tutorialspoint.com/kotlin/kotlin_delegation.htm Kotlin supports "delegation" design pattern by introducing a new keyword "by". Using this keyword or delegation methodology, Kotlin allows the derived class to access all the implemented public methods of an interface through a specific object. The following example demonstrates how this happens in Kotlin. interface Base { fun