Companion

object Companion

Functions

Link copied to clipboard
inline fun <K : Enum<K>, V : Any> enumMap(): EnumMap<K, V>

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>

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.

inline fun <K : Enum<K>, V : Any> enumMap(populator: (K) -> V?): EnumMap<K, V>

Answer a new EnumMap.