Kotlin HashMap asIterable()
Syntax & Examples


Syntax of HashMap.asIterable()

The syntax of HashMap.asIterable() extension function is:

fun <K, V> Map<out K, V>.asIterable(): Iterable<Entry<K, V>>

This asIterable() extension function of HashMap creates an Iterable instance that wraps the original map returning its entries when being iterated.