IterableExtensions<E> extension
Extensions for Iterable operations and utilities.
- on
-
- Iterable<
E>
- Iterable<
Methods
-
countWhere(
bool test(E element)) → int -
Available on Iterable<
Returns the number of elements that satisfyE> , provided by the IterableExtensions extensiontest. -
forEachIndexed(
void action(int index, E element)) → void -
Available on Iterable<
InvokesE> , provided by the IterableExtensions extensionactionfor each element together with its index. -
mapIndexed<
R> (R convert(int index, E element)) → Iterable< R> -
Available on Iterable<
Maps each element together with its index.E> , provided by the IterableExtensions extension -
none(
bool test(E element)) → bool -
Available on Iterable<
ReturnsE> , provided by the IterableExtensions extensiontrueif no element satisfiestest. -
partition(
bool test(E element)) → (List< E> , List<E> ) -
Available on Iterable<
Splits the elements into two lists: those matchingE> , provided by the IterableExtensions extensiontestand the rest. -
sumBy(
int selector(E element)) → int -
Available on Iterable<
Returns the sum ofE> , provided by the IterableExtensions extensionselectorapplied to each element. -
sumByDouble(
double selector(E element)) → double -
Available on Iterable<
Returns the sum ofE> , provided by the IterableExtensions extensionselectorapplied to each element as a double. -
zip<
R> (Iterable< R> other) → List<(E, R)> -
Available on Iterable<
Pairs each element with the element at the same position inE> , provided by the IterableExtensions extensionother.