Kotlin HashMap any()
Syntax & Examples
Syntax of HashMap.any()
There are 2 variations for the syntax of HashMap.any() extension function. They are:
1.
fun <K, V> Map<out K, V>.any(): Boolean
This extension function returns true if map has at least one entry.
2.
fun <K, V> Map<out K, V>.any( predicate: (Entry<K, V>) -> Boolean ): Boolean
This extension function returns true if at least one entry matches the given predicate.