IterableExtension<T> extension
extension for Iterable<T>
.
- on
-
- Iterable<
T>
- Iterable<
Properties
Methods
-
all(
bool test(T element)) → bool -
Checks whether ALL element of this iterable satisfies
test
. Returnsfalse
if isEmpty. -
combinations<
E> (int minimumSize, int maximumSize, {bool allowRepetition = true, bool checkAlphabet = true, Iterable< E> mapper(T e)?, bool validator(List<E> combination)?}) → List<List< E> > - Generate combinations using this Iterable elements as an alphabet.
-
comparator(
{Comparator< T> ? compare, T? sample}) → Comparator<T> -
Tries to returns a Comparator<T> for this instance.
Validates
compare
if provided. -
computeHashcode(
) → int -
Computes the
hashcode
of this Iterable, usingIterableEquality
defaults. -
containsAll(
Iterable< T> other) → bool -
Returns
true
ifthis
contains all elements ofother
. -
containsAny(
Iterable< T> other) → bool -
Returns
true
ifthis
contains at least 1 elements ofother
. -
copy(
) → Iterable< T> - Copies this Iterable preserving the original type if possible or returns a copy as List.
-
equalsElements(
Iterable< T> other) → bool -
Returns
true
if all the elements are equals toother
elements. -
groupBy<
G> (G grouper(T e)) → Map< G, List< T> > -
Groups elements by
grouper
. -
printElements(
{dynamic printer(Object? o)?, String? prefix}) → void - Print the elements.
-
toMap<
K, V> (K keyMapper(T e), V valueMapper(T e)) → Map< K, V> - Converts this List to a Map.
-
toStringsList(
) → List< String> - Returns a List
-
whereIn(
Iterable other, {Object? view(T e)?}) → Iterable< T> -
Returns a new lazy Iterable with all elements contained in
other
. -
whereNotIn(
Iterable other, {Object? view(T e)?}) → Iterable< T> -
Returns a new lazy Iterable with all elements NOT contained in
other
.