Kotlin HashMap mapKeys()
Syntax & Examples
Syntax of HashMap.mapKeys()
The syntax of HashMap.mapKeys() extension function is:
fun <K, V, R> Map<out K, V>.mapKeys( transform: (Entry<K, V>) -> R ): Map<R, V>
This mapKeys() extension function of HashMap returns a new Map with entries having the keys obtained by applying the transform function to each entry in this Map and the values of this map.