BetterMapNotifications<K, V> extension
Extension to provide additional methods for VN<Map<K, V>>.
The BetterMapNotifications extension enhances the functionality of VN<Map<K, V>>
by adding convenience methods for common map operations, while respecting
the ChangeType configuration of the parent VN instance.
Features:
- Key-based element access and modification.
- Map inspection properties (
isEmpty,isNotEmpty,length, etc.). - Methods for adding, removing, and clearing key-value pairs.
- Functional utilities for map transformations.
Properties
- isEmpty → bool
-
Available on VN<
ReturnsMap< , provided by the BetterMapNotifications extensionK, V> >trueif the map has no key-value pairs.no setter - isNotEmpty → bool
-
Available on VN<
ReturnsMap< , provided by the BetterMapNotifications extensionK, V> >trueif the map has one or more key-value pairs.no setter -
keys
→ Iterable<
K> -
Available on VN<
Returns an iterable of all keys in the map.Map< , provided by the BetterMapNotifications extensionK, V> >no setter - length → int
-
Available on VN<
Returns the number of key-value pairs in the map.Map< , provided by the BetterMapNotifications extensionK, V> >no setter -
values
→ Iterable<
V> -
Available on VN<
Returns an iterable of all values in the map.Map< , provided by the BetterMapNotifications extensionK, V> >no setter
Methods
-
clear(
) → void -
Available on VN<
Removes all key-value pairs from the map.Map< , provided by the BetterMapNotifications extensionK, V> > -
hardClear(
) → void -
Available on VN<
Removes all key-value pairs from the map and notifies listeners.Map< , provided by the BetterMapNotifications extensionK, V> > -
hardRemove(
K key) → V? -
Available on VN<
Removes the key-value pair with the givenMap< , provided by the BetterMapNotifications extensionK, V> >keyfrom the map and notifies listeners. -
hardRemoveWhere(
bool where(K key, V value)) → void -
Available on VN<
Removes all key-value pairs from the map that satisfy the predicateMap< , provided by the BetterMapNotifications extensionK, V> >whereand notifies listeners. -
map<
K2, V2> (MapEntry< K2, V2> converter(K k, V v)) → Map<K2, V2> -
Available on VN<
Transforms the map by applying a function to all its key-value pairs.Map< , provided by the BetterMapNotifications extensionK, V> > -
remove(
K key) → V? -
Available on VN<
Removes the key-value pair with the givenMap< , provided by the BetterMapNotifications extensionK, V> >keyfrom the map. -
removeWhere(
bool where(K key, V value)) → void -
Available on VN<
Removes all key-value pairs from the map that satisfy the given predicateMap< , provided by the BetterMapNotifications extensionK, V> >where. -
silentClear(
) → void -
Available on VN<
Removes all key-value pairs from the map without notifying listeners.Map< , provided by the BetterMapNotifications extensionK, V> > -
silentRemove(
K key) → V? -
Available on VN<
Removes the key-value pair with the givenMap< , provided by the BetterMapNotifications extensionK, V> >keyfrom the map without notifying listeners. -
silentRemoveWhere(
bool where(K key, V value)) → void -
Available on VN<
Removes all key-value pairs from the map that satisfy the predicateMap< , provided by the BetterMapNotifications extensionK, V> >wherewithout notifying listeners. -
smartClear(
) → void -
Available on VN<
Removes all key-value pairs from the map, with behavior determined by ChangeType.Map< , provided by the BetterMapNotifications extensionK, V> > -
smartRemove(
K key) → V? -
Available on VN<
Removes the key-value pair with the givenMap< , provided by the BetterMapNotifications extensionK, V> >keyfrom the map, with behavior determined by ChangeType. -
smartRemoveWhere(
bool where(K key, V value)) → void -
Available on VN<
Removes all key-value pairs from the map that satisfy the predicateMap< , provided by the BetterMapNotifications extensionK, V> >where, with behavior determined by ChangeType.
Operators
-
operator [](
K key) → V? -
Available on VN<
Retrieves the value associated with the givenMap< , provided by the BetterMapNotifications extensionK, V> >keyin the map. -
operator []=(
K key, V value) → void -
Available on VN<
Associates the givenMap< , provided by the BetterMapNotifications extensionK, V> >keywith the givenvaluein the map.