Kotlin HashMap mapNotNull()
Syntax & Examples
Syntax of HashMap.mapNotNull()
The syntax of HashMap.mapNotNull() extension function is:
fun <K, V, R : Any> Map<out K, V>.mapNotNull( transform: (Entry<K, V>) -> R? ): List<R>
This mapNotNull() extension function of HashMap returns a list containing only the non-null results of applying the given transform function to each entry in the original map.