Iterables<T> extension
Provides additional operations for Iterable.
- on
-
- Iterable<
T>
- Iterable<
Methods
-
distinct(
) → Iterable< T> - Returns an Iterable in which duplicate elements are pruned.
-
indexed(
{int initial = 0}) → Iterable< MapEntry< int, T> > -
Returns an Iterable that indexes each element, start from
initial
. -
listen(
void listen(T)) → Iterable< T> -
Returns an Iterable that, for each element, calls
listen
with the current element. -
mapWhere(
bool predicate(T), T replace(T)) → Iterable< T> -
Returns an Iterable that replaces elements that do not satisfy
predicate
with the new element returned byreplace
. -
none(
bool predicate(T)) → bool -
Returns
true
if none of the elements in this Iterable matchpredicate
. -
toMap<
K, V> (K key(T), V value(T)) → Map< K, V> -
Transforms this Iterable into map, using
key
andvalue
to produce keys and values respectively.