Загрузка страницы

Sealed Classes

KotlinBytes - Sealed Classes

Have you ever wondered what a sealed class is? When I first started to learn Kotlin, it took me forever to grasp when and how to use them. Hopefully, I can take what I have learned to help you guys understand a bit quicker. Let's get started!
Chapters:
0:00 - Intro
0:20 - What are Sealed Classes
0:34 - Setting up the Example
1:08 - Difference from Typical Class Inheritance
1:35 - Use Sealed Classes with a "when" Expression
3:03 - Testing
3:19 - What if you do not use Sealed Classes?
4:12 - When to use Sealed Classes
4:51 - Wrapping Up
Source code:
https://github.com/jacobklewis/Scratch-Notes/tree/master/src/main/kotlin/me/jacoblewis/sealed

Additional Resources:
https://kotlinlang.org/docs/reference/sealed-classes.html

Music:
Past (Move On) by | e s c p | https://escp-music.bandcamp.com
Music promoted by https://www.free-stock-music.com
Attribution 4.0 International (CC BY 4.0)
https://creativecommons.org/licenses/by/4.0/

Видео Sealed Classes канала KotlinBytes
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
18 января 2021 г. 6:00:07
00:05:30
Яндекс.Метрика