MapTransformExtensions<K, V> extension

Map values, map keys, filter by key/value.

on

Methods

filterKeys(bool keyPredicate(K key)) Map<K, V>

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

New map with only entries where keyPredicate is true.
filterValues(bool valuePredicate(V value)) Map<K, V>

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

New map with only entries where valuePredicate is true.
mapKeys<U>(U f(K key)) Map<U, V>

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

New map with same values, keys transformed by f. Collisions: last wins.
mapValues<U>(U f(V value)) Map<K, U>

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

New map with same keys, values transformed by f.