MapUtils<K, V> extension

on

Methods

containsDuplicateValues() bool

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

Checks if a map contains duplicate values in its values by using sets
equals(Object other) bool

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

sort(int compare(MapEntry<K, V>, MapEntry<K, V>)) Map<K, V>

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

Sorts the Map based on the given function and RETURNS the sorted map. (Doesn't sort in place!)
swap() Map<V, K>

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

Returns a map with the keys and values swapped. If there are duplicate keys the function throws an argument error (So use with containsDuplicateValues()).
where(bool func(MapEntry<K, V> mapEntry)) Map<K, V>

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

Works like List.where, you put in a function that takes a MapEntry and returns a bool. This will return new Map where the above function is true.