FpdartOnMap<K, V> extension
Functional programming functions on a mutable dart Map using fpdart
.
- on
-
- Map<
K, V>
- Map<
Properties
- size → int
-
Available on Map<
Return number of elements in the Map (K, V> , provided by the FpdartOnMap extensionkeys.length
).no setter
Methods
-
collect<
A> (Order< K> order, A compose(K key, V value)) → Iterable<A> -
Available on Map<
Collect all the entries in this Map into an Iterable usingK, V> , provided by the FpdartOnMap extensioncompose
, with the values ordered usingorder
. -
deleteAt(
Eq< K> eq, K key) → Map<K, V> -
Available on Map<
Delete entry at givenK, V> , provided by the FpdartOnMap extensionkey
if present in the Map and return updated Map. -
difference(
Eq< K> eq, Map<K, V> map) → Map<K, V> -
Available on Map<
Remove from this Map all the elements that have key contained in the givenK, V> , provided by the FpdartOnMap extensionmap
. -
extract<
T> (K key) → Option< T> -
Available on Map<
Return an Option that conditionally accesses map keys, only if they match the given type.K, V> , provided by the FpdartOnMap extension -
extractMap(
K key) → Option< Map< K, dynamic> > -
Available on Map<
Return an Option that conditionally accesses map keys if they contain a value with a Map value.K, V> , provided by the FpdartOnMap extension -
filter(
bool test(V value)) → Map< K, V> -
Available on Map<
Returns a new Map containing all the elements of this Map where the value satisfiesK, V> , provided by the FpdartOnMap extensiontest
. -
filterWithIndex(
bool test(V value, int index)) → Map< K, V> -
Available on Map<
Returns a new Map containing all the elements of this Map where the value satisfiesK, V> , provided by the FpdartOnMap extensiontest
. -
filterWithKey(
bool test(K key, V value)) → Map< K, V> -
Available on Map<
Returns a new Map containing all the elements of this Map where key/value satisfiesK, V> , provided by the FpdartOnMap extensiontest
. -
filterWithKeyAndIndex(
bool test(K key, V value, int index)) → Map< K, V> -
Available on Map<
Returns a new Map containing all the elements of this Map where key/value satisfiesK, V> , provided by the FpdartOnMap extensiontest
. -
foldLeft<
A> (Order< K> order, A initial, A compose(A acc, V value)) → A -
Available on Map<
ApplyK, V> , provided by the FpdartOnMap extensioncompose
to all the values of this Map sorted based onorder
on their key, and return the result of combining all the intermediate values. -
foldLeftWithIndex<
A> (Order< K> order, A initial, A compose(A acc, V value, int index)) → A -
Available on Map<
ApplyK, V> , provided by the FpdartOnMap extensioncompose
to all the values of this Map sorted based onorder
on their key, passing also the current index of the iteration, and return the result of combining all the intermediate values. -
foldLeftWithKey<
A> (Order< K> order, A initial, A compose(A acc, K key, V value)) → A -
Available on Map<
ApplyK, V> , provided by the FpdartOnMap extensioncompose
to all the values of this Map sorted based onorder
on their key, and return the result of combining all the intermediate values. -
foldLeftWithKeyAndIndex<
A> (Order< K> order, A initial, A compose(A acc, K key, V value, int index)) → A -
Available on Map<
ApplyK, V> , provided by the FpdartOnMap extensioncompose
to all the values of this Map sorted based onorder
on their key, passing also the current index of the iteration, and return the result of combining all the intermediate values. -
foldRight<
A> (Order< K> order, A initial, A compose(V value, A acc)) → A -
Available on Map<
ApplyK, V> , provided by the FpdartOnMap extensioncompose
to all the values of this Map sorted based on the inverse oforder
on their key, and return the result of combining all the intermediate values. -
foldRightWithIndex<
A> (Order< K> order, A initial, A compose(V value, A acc, int index)) → A -
Available on Map<
ApplyK, V> , provided by the FpdartOnMap extensioncompose
to all the values of this Map sorted based on the inverse oforder
on their key, passing also the current index of the iteration, and return the result of combining all the intermediate values. -
foldRightWithKey<
A> (Order< K> order, A initial, A compose(K key, V value, A acc)) → A -
Available on Map<
ApplyK, V> , provided by the FpdartOnMap extensioncompose
to all the values of this Map sorted based on the inverse oforder
on their key, and return the result of combining all the intermediate values. -
foldRightWithKeyAndIndex<
A> (Order< K> order, A initial, A compose(K key, V value, A acc, int index)) → A -
Available on Map<
ApplyK, V> , provided by the FpdartOnMap extensioncompose
to all the values of this Map sorted based on the inverse oforder
on their key, passing also the current index of the iteration, and return the result of combining all the intermediate values. -
intersection(
Eq< K> eq, V combine(V x, V y), Map<K, V> map) → Map<K, V> -
Available on Map<
Intersect the key/value of two Map usingK, V> , provided by the FpdartOnMap extensioncombine
where the key is the same. -
isSubmap(
Eq< K> eqK, Eq<V> eqV, Map<K, V> map) → bool -
Available on Map<
Test whether or not the givenK, V> , provided by the FpdartOnMap extensionmap
contains all of the keys and values contained in this Map. -
lookup(
K key) → Option< V> -
Available on Map<
Get the value at givenK, V> , provided by the FpdartOnMap extensionkey
if present, otherwise return None. -
lookupEq(
Eq< K> eq, K key) → Option<V> -
Available on Map<
Get the value at givenK, V> , provided by the FpdartOnMap extensionkey
if present usingeq
, otherwise return None. -
lookupKeyEq(
Eq< K> eq, K key) → Option<K> -
Available on Map<
Get the key equal toK, V> , provided by the FpdartOnMap extensionkey
if present, otherwise return None. -
lookupWithKey(
K key) → Option< (K, V)> -
Available on Map<
Get the value and key at givenK, V> , provided by the FpdartOnMap extensionkey
if present, otherwise return None. -
lookupWithKeyEq(
Eq< K> eq, K key) → Option<(K, V)> -
Available on Map<
Get the value and key at givenK, V> , provided by the FpdartOnMap extensionkey
if present usingeq
, otherwise return None. -
mapValue<
A> (A update(V value)) → Map< K, A> -
Available on Map<
Convert each value of the Map using theK, V> , provided by the FpdartOnMap extensionupdate
function and returns a new Map. -
mapWithIndex<
A> (A update(V value, int index)) → Map< K, A> -
Available on Map<
Convert each value of the Map using theK, V> , provided by the FpdartOnMap extensionupdate
function and returns a new Map. -
modifyAt(
Eq< K> eq, V update(V value), K key) → Option<Map< K, V> > -
Available on Map<
If the givenK, V> , provided by the FpdartOnMap extensionkey
is present in the Map, then modify its value usingupdate
and return the Map. -
modifyAtIfPresent(
Eq< K> eq, V update(V value), K key) → Map<K, V> -
Available on Map<
If the givenK, V> , provided by the FpdartOnMap extensionkey
is present in the Map, then modify its value usingupdate
and return a the new Map. -
pop(
Eq< K> eq, K key) → Option<(V, Map< K, V> )> -
Available on Map<
Delete aK, V> , provided by the FpdartOnMap extensionkey
and value from a this Map, returning the deleted value as well as the updated Map. -
toSortedList(
Order< K> order) → List<MapEntry< K, V> > -
Available on Map<
Get a sorted List of the key/value pairs contained in this Map based onK, V> , provided by the FpdartOnMap extensionorder
on keys. -
union(
Eq< K> eq, V combine(V x, V y), Map<K, V> map) → Map<K, V> -
Available on Map<
Combine the key/value of this Map andK, V> , provided by the FpdartOnMap extensionmap
usingcombine
where the key is the same. -
updateAt(
Eq< K> eq, K key, V value) → Option<Map< K, V> > -
Available on Map<
If the givenK, V> , provided by the FpdartOnMap extensionkey
is present in the Map, then update its value tovalue
. -
updateAtIfPresent(
Eq< K> eq, K key, V value) → Map<K, V> -
Available on Map<
If the givenK, V> , provided by the FpdartOnMap extensionkey
is present in the Map, then update its value tovalue
. Otherwise, return a copy of the original unmodified Map. -
upsertAt(
Eq< K> eq, K key, V value) → Map<K, V> -
Available on Map<
Insert or replace a key/value pair in a Map.K, V> , provided by the FpdartOnMap extension