sealed interface Switch> { val values: List companion object { val entries: List> = listOf(Flag, Ternary) } } object Flag : Switch { override val values: List get() = emptyList() } object Ternary : Switch { enum class Value { True, False, FileNotFound } override val values: List get() = Value.entries }