EnumValue

interface EnumValue<T : Enum<T>>

Known direct subclasses
EnumValue.Known

Represents a known enum value.

EnumValue.Unknown

Represents an unknown enum value.


Stores the value of an enum or a string if the string does not correspond to one of the enum's values.

Summary

Nested types

class EnumValue.Known<T : Enum<T>> : EnumValue

Represents a known enum value.

Represents an unknown enum value.

Public properties

String

The string value of the enum, either the Enum.name of Known.value in the case of Known or the stringValue given to the constructor in the case of Unknown.

T?

Known.value in the case of Known, or null in the case of Unknown.

Public properties

stringValue

val stringValueString

The string value of the enum, either the Enum.name of Known.value in the case of Known or the stringValue given to the constructor in the case of Unknown.

value

val value: T?

Known.value in the case of Known, or null in the case of Unknown.