getOf

inline fun <T : Any> StringKeyedMap<*>.getOf(key: String): T

Utility function for getting a key from the given String-keyed map, attempting to cast it to the given generic type, T. Will throw if the key is missing or the value cannot be cast.

Note: This function does not support maps with nullable values.

Throws

when the map doesn't contain the given key