Skip to content

Glossary: Kotlin Basics

sealed class

Also written: sealed

A class whose subclasses are all known when the code is compiled. Each value is exactly one of that fixed set of kinds, such as a Card, Cash or GiftCard payment, so `when` can be checked for completeness.

Where the book teaches it

Related terms

exhaustivesubclassdata objectis