ObjMapNullExt<K, V> extension

on

Properties

entries Iterable<MapEntry<K, V>>?
The map entries of this.
no setter
isEmpty bool?
Whether there is no key/value pair in the map.
no setter
isNotEmpty bool?
Whether there is at least one key/value pair in the map.
no setter
keys Iterable<K>?
The keys of this.
no setter
length int?
The number of key/value pairs in the map.
no setter
values Iterable<V>?
The values of this.
no setter

Methods

addAll(Map<K, V> other) → void
Adds all key/value pairs of other to this map.
addEntries(Iterable<MapEntry<K, V>> newEntries) → void
Adds all key/value pairs of newEntries to this map.
cast<RK, RV>() Map<RK, RV>?
Provides a view of this map as having RK keys and RV instances, if necessary.
clear() → void
Removes all entries from the map.
containsKey(Object? key) bool?
Whether this map contains the given key.
containsValue(Object? valueToEvaluate) bool?
Whether this map contains the given value.
forEach(void action(K key, V value)) → void
Applies action to each key/value pair of the map.
map<K2, V2>(MapEntry<K2, V2> convert(K key, V value)) Map<K2, V2>?
Returns a new map where all entries of this map are transformed by the given convert function.
putIfAbsent(K key, V ifAbsent()) → V?
Look up the value of key, or add a new entry if it isn't there.
remove(Object? key) → V?
Removes key and its associated value, if present, from the map.
removeWhere(bool test(K key, V value)) → void
Removes all entries of this map that satisfy the given test.
updateAll(V update(K key, V value)) → void
Updates all values.
updateMap(K key, V update(V value), {V ifAbsent()?}) → V?
Updates the value for the provided key.

Operators

operator [](Object? key) → V?
The value for the given key, or null if key is not in the map.
operator []=(K key, V valueToSet) → void
Associates the key with the given value.