IterableBasics<E> extension
Utility extension methods for the native Iterable class.
- on
-
- Iterable<
E>
- Iterable<
Methods
-
all(
bool test(E)) → bool -
Available on Iterable<
Alias for IterableE> , provided by the IterableBasics extension.every. -
average(
num value(E)) → num? -
Available on Iterable<
Returns the average of all the values in this iterable, as defined byE> , provided by the IterableBasics extensionvalue. -
containsAll(
Iterable< E> other, {bool collapseDuplicates = true}) → bool -
Available on Iterable<
Returns true if every element inE> , provided by the IterableBasics extensionotheralso exists inthis. -
containsAny(
Iterable< E> other) → bool -
Available on Iterable<
ReturnsE> , provided by the IterableBasics extensiontrueifthiscontains at least one element also contained inother. -
getRandom(
{int? seed}) → E? -
Available on Iterable<
Returns a random element ofE> , provided by the IterableBasics extensionthis, ornullifthisis empty. -
getRange(
int start, int end) → Iterable< E> -
Available on Iterable<
Returns an Iterable containing the firstE> , provided by the IterableBasics extensionendelements ofthis, excluding the firststartelements. -
max(
Comparator< E> compare) → E? -
Available on Iterable<
Returns the greatest element ofE> , provided by the IterableBasics extensionthisas ordered bycompare, ornullifthisis empty. -
maxBy(
Comparable sortKey(E)) → E? -
Available on Iterable<
Returns the element ofE> , provided by the IterableBasics extensionthiswith the greatest value forsortKey, ornullifthisis empty. -
min(
Comparator< E> compare) → E? -
Available on Iterable<
Returns the smallest element ofE> , provided by the IterableBasics extensionthisas ordered bycompare, ornullifthisis empty. -
minBy(
Comparable sortKey(E)) → E? -
Available on Iterable<
Returns the element ofE> , provided by the IterableBasics extensionthiswith the least value forsortKey, ornullifthisis empty. -
none(
bool test(E)) → bool -
Available on Iterable<
ReturnsE> , provided by the IterableBasics extensiontrueif no element ofthissatisfiestest. -
one(
bool test(E)) → bool -
Available on Iterable<
ReturnsE> , provided by the IterableBasics extensiontrueif there is exactly one element ofthiswhich satisfiestest. -
sum(
num addend(E)) → num -
Available on Iterable<
Returns the sum of all the values in this iterable, as defined byE> , provided by the IterableBasics extensionaddend.