Sealed class — enum with special powers
Sealed Classes in Kotlin
Learn how to use sealed classes in Android
Sealed Classes in Kotlin is another new concept which we don’t have in traditional Java. Sealed class is sort of an extension to the traditional ENUM classes.
A sealed class allows you to represent constrained hierarchies in which an object can only be of one of the given types.