enum Map
Create an empty EnumMap for the provided reified key type. This form of creation avoids the need for the client to extract the enum's array of constants.
inline fun <K : Enum<K>, V : Any> enumMap(vararg values: V?): EnumMap<K, V>
Content copied to clipboard
Answer a new EnumMap. The key type must be known statically at the call site, since this inline function is reified for the key type parameter.
Parameters
values
The vararg Array of values stored in this Enum.
inline fun <K : Enum<K>, V : Any> enumMap(populator: (K) -> V?): EnumMap<K, V>
Content copied to clipboard
Answer a new EnumMap.
Parameters
populator
A lambda that accepts a value of the Enum and answers a value to be stored at the enum value key.