MapExtension<K, V> extension
Extension for Map<K, V>
.
- on
-
- Map<
K, V>
- Map<
Methods
-
copy(
) → Map< K, V> - Copies this Map.
-
equalsKeysValues(
Iterable< K> keys, Map<K, V> other) → bool -
Returns
true
ifother
havekeys
of equals value. -
filterKey(
K key, V filter(V val)) → bool -
Filter
key
withfilter
. -
getStringKeyValue(
String key) → V? -
Returns a value by String
key
, treating all this instance keys as String. -
getUnknownKeys(
Iterable< K> knownKeys) → List<K> -
Returns all unknown keys, not present at
knownKeys
. -
getValuesInKeysOrder(
Iterable< K> keys) → List<V> -
Returns the values for
keys
(in the same order). -
getValuesInStringKeysOrder(
Iterable< String> keys) → List<V> -
Returns the values for
keys
(in the same order), using getStringKeyValue. -
keepKeys(
Iterable< K> keys) → void -
Only keep
keys
, removing any key not inkeys
parameter. -
keepKeysAndReturnValus(
Iterable< K> keys) → Map<K, V> -
Only keep
keys
, removing any key not inkeys
parameter, than return a Map with them. -
mergeKeysValues<
M> (Map< K, V> other, M merger(K key, V val1, V val2), {V onAbsentKey(K key, bool other)?}) → Map<K, M> -
Merge this instance with
other
, callingmerger
for each key (of both Maps). -
mergeKeysValuesNullable<
M> (Map< K, V> other, M merger(K key, V? val1, V? val2)) → Map<K, M> -
Same as mergeKeysValues, but allows
null
atmerger
. -
mergeKeysValuesToList(
Map< K, V> other, {V onAbsentKey(K key, bool other)?}) → Map<K, List< V> > -
Merge this instance with
other
, merging keys values to aList
<V
>. See mergeKeysValues. -
mergeKeysValuesToListNoNulls(
Map< K, V> other) → Map<K, List< V> > -
Same as mergeKeysValuesToList, but ignore
null
values. See mergeKeysValues. -
mergeKeysValuesToListNullable(
Map< K, V> other) → Map<K, List< V?> > -
Same as mergeKeysValuesToList, but allows
null
values. See mergeKeysValues. -
printElements(
{dynamic printer(Object? o)?, String prefix = '', String keyDelimiter = ': '}) → void -
Prints this Map entries to
printer
, usingkeyDelimiter
("$key$keyDelimiter$value"
) to map each entry to String. -
removeKeys(
Iterable< K> keys) → void -
Remove
keys
. -
removeKeysAndReturnValues(
Iterable< K> keys) → Map<K, V> -
Removes
keys
and return a Map with them. -
renameKeys(
Map< K, K> rename) → void -
Rename the keys using the
rename
mapper.