Kotlin HashMap firstNotNullOfOrNull()
Syntax & Examples
Syntax of HashMap.firstNotNullOfOrNull()
The syntax of HashMap.firstNotNullOfOrNull() extension function is:
fun <K, V, R : Any> Map<out K, V>.firstNotNullOfOrNull( transform: (Entry<K, V>) -> R? ): R?
This firstNotNullOfOrNull() extension function of HashMap returns the first non-null value produced by transform function being applied to entries of this map in iteration order, or null if no non-null value was produced.