MapPureExtensions<K, V> extension
Properties
-
firstOrNull
→ MapEntry<K, V>?
-
Returns the first entry if it exists otherwise null.
no setter
-
lastOrNull
→ MapEntry<K, V>?
-
Returns the last entry if it exists otherwise null.
no setter
Methods
-
any(bool test(K key, V value))
→ bool
-
Checks whether any entry of this map satisfies
test
.
-
encodeToString()
→ String
-
-
every(bool test(K key, V value))
→ bool
-
Checks whether every entry of this map satisfies
test
.
-
firstWhere(bool test(K key, V value), {MapEntry<K, V> orElse()?})
→ MapEntry<K, V>
-
Returns the first entry that satisfies the given predicate
test
.
Iterable.firstWhere
-
firstWhereOrNull(bool test(K key, V value))
→ MapEntry<K, V>?
-
Returns the first entry that satisfies
test
otherwise null.
Iterable.firstWhere
-
fold<T>(T initialValue, T combine(T previousValue, MapEntry<K, V> entry))
→ T
-
Reduces a map to a single value by iteratively combining elements
of the map using the provided function.
-
generateIterable<T>(T generator(K key, V value))
→ Iterable<T>
-
returns a List from entries
-
get(K key)
→ V
-
Returns the value
key
.
-
getOrNull(K? key)
→ V?
-
Returns the value
key
or null if it not exist.
-
lastWhere(bool test(K key, V value), {MapEntry<K, V> orElse()?})
→ MapEntry<K, V>
-
Returns the last entry that satisfies the given predicate
test
.
Iterable.lastWhere
-
lastWhereOrNull(bool test(K key, V value))
→ MapEntry<K, V>?
-
Returns the last entry that satisfies
test
otherwise null.
Iterable.lastWhere
-
reduce(MapEntry<K, V> combine(MapEntry<K, V> value, MapEntry<K, V> entry))
→ MapEntry<K, V>
-
Reduces a map to a single value by iteratively combining entries
of the collection using the provided function.
-
serialize()
→ Iterable
-
-
singleWhere(bool test(K key, V value), {MapEntry<K, V> orElse()?})
→ MapEntry<K, V>
-
Returns the single element that satisfies
test
.
Iterable.lastWhere
-
singleWhereOrNull(bool test(K key, V value))
→ MapEntry<K, V>?
-
Returns the single element that satisfies
test
.
Iterable.singleWhere
-
where(bool predicate(K key, V value))
→ Map<K, V>
-
Returns a new map with all entries that satisfy the predicate
test
.