BuiltMapExt<K, V> extension

on
  • BuiltMap<K, V>

Properties

firstOrNull MapEntry<K, V>?

Available on BuiltMap<K, V>, provided by the BuiltMapExt extension

Returns the first entry if it exists otherwise null.
no setter
lastOrNull MapEntry<K, V>?

Available on BuiltMap<K, V>, provided by the BuiltMapExt extension

Returns the last entry if it exists otherwise null.
no setter

Methods

any(bool test(K key, V value)) bool

Available on BuiltMap<K, V>, provided by the BuiltMapExt extension

Checks whether any entry of this map satisfies test.
every(bool test(K key, V value)) bool

Available on BuiltMap<K, V>, provided by the BuiltMapExt extension

Checks whether every entry of this map satisfies test.
firstWhere(bool test(K key, V value), {MapEntry<K, V> orElse()?}) MapEntry<K, V>

Available on BuiltMap<K, V>, provided by the BuiltMapExt extension

Returns the first entry that satisfies the given predicate test. Iterable.firstWhere
firstWhereOrNull(bool test(K key, V value)) MapEntry<K, V>?

Available on BuiltMap<K, V>, provided by the BuiltMapExt extension

Returns the first entry that satisfies test otherwise null. Iterable.firstWhere
fold<T>(T initialValue, T combine(T previousValue, MapEntry<K, V> entry)) → T

Available on BuiltMap<K, V>, provided by the BuiltMapExt extension

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>

Available on BuiltMap<K, V>, provided by the BuiltMapExt extension

returns a List from entries
get(K key) → V

Available on BuiltMap<K, V>, provided by the BuiltMapExt extension

Returns the value key.
getOrNull(K key) → V?

Available on BuiltMap<K, V>, provided by the BuiltMapExt extension

Returns the value key or null if it not exist.
lastWhere(bool test(K key, V value), {MapEntry<K, V> orElse()?}) MapEntry<K, V>

Available on BuiltMap<K, V>, provided by the BuiltMapExt extension

Returns the last entry that satisfies the given predicate test. Iterable.lastWhere
lastWhereOrNull(bool test(K key, V value)) MapEntry<K, V>?

Available on BuiltMap<K, V>, provided by the BuiltMapExt extension

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>

Available on BuiltMap<K, V>, provided by the BuiltMapExt extension

Reduces a map to a single value by iteratively combining entries of the collection using the provided function.
singleWhere(bool test(K key, V value), {MapEntry<K, V> orElse()?}) MapEntry<K, V>

Available on BuiltMap<K, V>, provided by the BuiltMapExt extension

Returns the single element that satisfies test. Iterable.lastWhere
singleWhereOrNull(bool test(K key, V value)) MapEntry<K, V>?

Available on BuiltMap<K, V>, provided by the BuiltMapExt extension

Returns the single element that satisfies test. Iterable.singleWhere
where(bool predicate(K key, V value)) → BuiltMap<K, V>

Available on BuiltMap<K, V>, provided by the BuiltMapExt extension

Returns a new map with all entries that satisfy the predicate test.