3 ms·
In kotlin you can delegate the implementation of an interface to another object. Basically syntatic sugar for the delegation pattern. https://kotlinlang.org/do
by tm-guimaraes 5y ago
In kotlin you can delegate the implementation of an interface to another object. Basically syntatic sugar for the delegation pattern.
https://kotlinlang.org/docs/delegation.html https://kotlinlang.org/docs/delegation.html
With it, you F150 can say it implements the "movable" interface, just buy stating which field it contains that implements it, and the you can run "f150.move"