Читать книгу Programming Kotlin Applications - Бретт Мак-Лахлин, Brett McLaughlin - Страница 78

CLASSES CAN HAVE CUSTOM BEHAVIOR

Оглавление

What we need is a way to define some custom behavior. Specifically, when a first name or last name of a person is changed, their full name should also be changed. With custom mutators, part of this work is done; we have a place to call custom code, but no custom code to call.

Programming Kotlin Applications

Подняться наверх