CollectionOps<T> extension
- on
-
- Iterable<
T>
- Iterable<
Properties
- headOption → T?
-
Available on Iterable<
safely access first element of list that may be empty.T> , provided by the CollectionOps extensionno setter - lastOption → T?
-
Available on Iterable<
safely access last element of list that may be empty.T> , provided by the CollectionOps extensionno setter -
zipWithIndex
→ Iterable<
$< T, int> > -
Available on Iterable<
zip values with indexT> , provided by the CollectionOps extensionno setter
Methods
-
chunk(
int n) → Iterable< Iterable< T> > -
Available on Iterable<
returns a list of list of length up to n. exampleT> , provided by the CollectionOps extension -
count(
bool f(T)) → int -
Available on Iterable<
count up elements applying function f returns true.T> , provided by the CollectionOps extension -
groupBy<
S> (S f(T)) → Map< S, Iterable< T> > -
Available on Iterable<
returns Map<S,IterableT> , provided by the CollectionOps extension -
interspace<
R extends T> (R r) → Iterable< T> -
Available on Iterable<
insert value between each elementT> , provided by the CollectionOps extension -
slice(
int from, [int? to]) → Iterable< T> -
Available on Iterable<
return sublist of range [from,to)T> , provided by the CollectionOps extension -
slide(
) → Iterable< $< T, T> > -
Available on Iterable<
returns a list of pairs of values slided by 1. exampleT> , provided by the CollectionOps extension -
sliding(
int n) → Iterable< Iterable< T> > -
Available on Iterable<
/// returns a list of pairs of values slided by n. exampleT> , provided by the CollectionOps extension -
sorted(
[int f(T, T)?]) → Iterable< T> -
Available on Iterable<
returns new sorted iterable.T> , provided by the CollectionOps extension -
splitAt(
int n) → $< Iterable< T> , Iterable<T> > -
Available on Iterable<
T> , provided by the CollectionOps extension -
zip<
S> (Iterable< S> t) → List<$< T, S> > -
Available on Iterable<
zip corresponding values with values from another iterable. If one iterable is shorter than the other, it generates iterable of shorter length.T> , provided by the CollectionOps extension