MapExtensions<K, V> extension
Extensions on Map for lookup and transformation.
- on
-
- Map<
K, V>
- Map<
Methods
-
deepMerge(
Map< K, V> other) → Map<K, V> -
Available on Map<
Recursively merges two maps.K, V> , provided by the MapExtensions extension -
filterKeys(
bool test(K key)) → Map< K, V> -
Available on Map<
Keeps entries whose key matchesK, V> , provided by the MapExtensions extensiontest. -
filterValues(
bool test(V value)) → Map< K, V> -
Available on Map<
Keeps entries whose value matchesK, V> , provided by the MapExtensions extensiontest. -
getOrElse(
K key, V defaultValue) → V -
Available on Map<
Gets a value from a map, or a default value if the key doesn't exist.K, V> , provided by the MapExtensions extension -
getOrPut(
K key, V put()) → V -
Available on Map<
Returns the value forK, V> , provided by the MapExtensions extensionkey, computing and storing it if absent. -
invert(
) → Map< V, K> -
Available on Map<
Swaps keys and values.K, V> , provided by the MapExtensions extension -
keysOf(
V value) → List< K> -
Available on Map<
Keys whose value equalsK, V> , provided by the MapExtensions extensionvalue. -
mapKeys<
T> (T transform(K key)) → Map< T, V> -
Available on Map<
Transforms the keys of a map.K, V> , provided by the MapExtensions extension -
mapValues<
T> (T transform(V value)) → Map< K, T> -
Available on Map<
Transforms the values of a map.K, V> , provided by the MapExtensions extension -
merge(
Map< K, V> other) → Map<K, V> -
Available on Map<
Shallow merge withK, V> , provided by the MapExtensions extensionother(other wins on key conflicts). -
omit(
Iterable< K> keys) → Map<K, V> -
Available on Map<
Returns a new map without the givenK, V> , provided by the MapExtensions extensionkeys. -
pick(
Iterable< K> keys) → Map<K, V> -
Available on Map<
Returns a new map with only the givenK, V> , provided by the MapExtensions extensionkeys(missing keys ignored). -
where(
bool test(K key, V value)) → Map< K, V> -
Available on Map<
Filters a map based on a predicate.K, V> , provided by the MapExtensions extension