MapExtension<K, V> extension

Provides extension methods for the Map class to perform various operations.

on

Methods

addIf(bool f(K key, V value), K key, V value) Map<K, V>

Available on Map<K, V>, provided by the MapExtension extension

Adds an entry to the map if the predicate f is satisfied.
addIndexIf(bool f(K key, V value, int index), K key, V value, int index) Map<K, V>

Available on Map<K, V>, provided by the MapExtension extension

Adds an entry to the map if the predicate f with index is satisfied.