IterableExtensions<T> extension
Operations on iterables.
- on
-
- Iterable<
T>
- Iterable<
- @Since("3.0")
Properties
- firstOrNull → T?
-
The first element of this iterator, or
null
if the iterable is empty.read-only -
indexed
→ Iterable<
(int, T)> -
Pairs of elements of the indices and elements of this iterable.
read-only
- lastOrNull → T?
-
The last element of this iterable, or
null
if the iterable is empty.read-only - singleOrNull → T?
-
The single element of this iterator, or
null
.read-only
Methods
-
elementAtOrNull(
int index) → T? -
The element at position
index
of this iterable, ornull
.