MapExt<K, V> extension

Extensions to Maps

on

Methods

all(EntryPredicate<K, V> test) bool
Returns true if all entries match the given predicate test.
any(EntryPredicate<K, V> test) bool
Returns true if at least one entry matches the given predicate test.
flatMap<T>(EntryTransform<K, V, Iterable<T>> f) Iterable<T>
Return a new lazy Iterable of all elements yielded from results of transform f function being invoked on each element of original entries.
flatMapToList<T>(List<T> destination, EntryTransform<K, V, Iterable<T>> f) List<T>
Appends to the give destination with the elements yielded from results of transform f function being invoked on each element of original entries.
flatMapToSet<T>(Set<T> destination, EntryTransform<K, V, Iterable<T>> f) Set<T>
Appends to the give destination with the elements yielded from results of transform f function being invoked on each element of original entries.
mapEntries<T>(EntryTransform<K, V, T> f) Iterable<T>
Transforms each entry to object of type T, by applying the transformer f.
mapToList<T>(List<T> destination, EntryTransform<K, V, T> f) List<T>
Transforms entries to objects of type T with the transformer f, and appends the result to the given destination.
mapToSet<T>(Set<T> destination, EntryTransform<K, V, T> f) Set<T>
Transforms entries to objects of type T with the transformer f, and appends the result to the given destination.
none(EntryPredicate<K, V> test) bool
Returns true if no entries match the given predicate test.
where(EntryPredicate<K, V> test) Iterable<MapEntry<K, V>>
Returns a new lazy Iterable with all entries that satisfy the predicate test, providing sequential index of the element.
whereNot(EntryPredicate<K, V> test) Iterable<MapEntry<K, V>>
Returns a new lazy Iterable with all entries that do NOT satisfy the predicate test.