Iterables<E> extension
Provides functions for transforming Iterables to other collections.
Functions that rely on the ordering of elements are non-deterministic if an iterable is unordered, i.e. HashSet.
- on
-
- Iterable<
E>
- Iterable<
Properties
Methods
-
associate<
R> ({required Select< E, R> by}) → Map<R, E> -
Available on Iterable<
Returns a map that associates values returned byE> , provided by the Iterables extensionby
with elements in this iterable. -
distinct(
{required Select< E, Object?> by}) → Iterable<E> -
Available on Iterable<
Returns a lazy iterable with only distinct elements.E> , provided by the Iterables extension -
toMap<
K, V> ((K, V) create(E element)) → Map< K, V> -
Available on Iterable<
Returns a modifiable map usingE> , provided by the Iterables extensioncreate
to produce entries from elements in this iterable. -
toUnmodifiableList(
) → List< E> -
Available on Iterable<
Transforms this iterable into an unmodifiable List.E> , provided by the Iterables extension -
toUnmodifiableMap<
K, V> ((K, V) create(E element)) → Map< K, V> -
Available on Iterable<
Returns an unmodifiable map usingE> , provided by the Iterables extensioncreate
to produce entries from elements in this iterable. -
toUnmodifiableSet(
) → Set< E> -
Available on Iterable<
Transforms this iterable into an unmodifiable Set.E> , provided by the Iterables extension