DHUMapExtension<K, V> extension

DHUMapExtension

on

Methods

filter(bool predicate(K key, V value)) Map<K, V>

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

Filters the map, retaining only entries that satisfy the given predicate.
keysWhere(bool condition(V)) Iterable<K>

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

Returns an iterable of keys where the associated values satisfy the given condition.
mapValues<V2>(V2 transform(V)) Map<K, V2>

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

Transforms the values in this map using the given function.
setIfMissing(K key, V value) → V

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

Inserts a key-value pair into the map if the key does not already exist.
swapKeysWithValues() Map<V, K>

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

Swaps the keys with values in the map. Note: If there are duplicate values, the last key-value pair will be kept.