IterableX<T> extension
Extensions for Iterable.
- on
-
- Iterable<
T>
- Iterable<
Properties
- hasOne → bool
-
Available on Iterable<
Returns true if length of this Iterable is 1.T> , provided by the IterableX extensionno setter - isLengthEven → bool
-
Available on Iterable<
Whether length of this Iterable is even.T> , provided by the IterableX extensionno setter - isLengthOdd → bool
-
Available on Iterable<
Whether length of this Iterable is odd.T> , provided by the IterableX extensionno setter
Methods
-
count(
bool test(T element)) → int -
Available on Iterable<
Returns the number of elements matching the givenT> , provided by the IterableX extensiontest
predicate. -
ifEmpty(
Iterable< T> value) → Iterable<T> -
Available on Iterable<
Returns this Iterable if it's not empty, otherwise returnsT> , provided by the IterableX extensionvalue
. -
mapToList<
R> (R toElement(T e), {bool growable = false}) → List< R> -
Available on Iterable<
Creates a List with all elements of this Iterable modified byT> , provided by the IterableX extensiontoElement
. -
mapToListWhere<
R> (R toElement(T e), bool test(T e), {bool growable = false}) → List< R> -
Available on Iterable<
Creates a List with all elements of this Iterable that satisfy the predicateT> , provided by the IterableX extensiontest
and modified bytoElement
. -
mapToSet<
R> (R toElement(T e), {bool modifiable = false}) → Set< R> -
Available on Iterable<
Creates a Set with all elements of this Iterable modified byT> , provided by the IterableX extensiontoElement
. -
mapToSetWhere<
R> (R toElement(T e), bool test(T e), {bool modifiable = false}) → Set< R> -
Available on Iterable<
Creates a Set with all elements of this Iterable that satisfy the predicateT> , provided by the IterableX extensiontest
and modified bytoElement
. -
toFixedList(
) → List< T> -
Available on Iterable<
Creates a fixed-length List containing the elements of this Iterable.T> , provided by the IterableX extension -
toUnmodifiableList(
) → List< T> -
Available on Iterable<
Creates an unmodifiable List containing the elements of this Iterable.T> , provided by the IterableX extension -
toUnmodifiableSet(
) → Set< T> -
Available on Iterable<
Creates an unmodifiable Set containing the elements of this Iterable.T> , provided by the IterableX extension