forEach

fun forEach(action: (key: Int, value: V) -> Unit)

Runs action for every entry, walking the table directly so that nothing is allocated to iterate - no entry objects, no boxed keys.

Order is the table's, which is neither insertion order nor key order and changes when the map grows.

Parameters

action

Called with each key and its value.