Package kotlin.enums

Types

Common
JVM
JS
Native
1.9

EnumEntries

A specialized immutable implementation of List interface that contains all enum entries of the specified enum type E. EnumEntries contains all enum entries in the order they are declared in the source code, consistently with the corresponding Enum.ordinal values.

sealed interface EnumEntries<E : Enum<E>> : List<E>

Functions

Common
JVM
JS
Native
1.9

enumEntries

Returns EnumEntries list containing all enum entries for the given enum type T.

fun <T : Enum<T>> enumEntries(): EnumEntries<T>