Kotlin HashMap firstNotNullOf()
Syntax & Examples
Syntax of HashMap.firstNotNullOf()
The syntax of HashMap.firstNotNullOf() extension function is:
fun <K, V, R : Any> Map<out K, V>.firstNotNullOf( transform: (Entry<K, V>) -> R? ): R
This firstNotNullOf() 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 throws NoSuchElementException if no non-null value was produced.