IterableExtensions<T> extension

Operations on iterables.

on
Annotations
  • @Since("3.0")

Properties

firstOrNull → T?

Available on Iterable<T>, provided by the IterableExtensions extension

The first element of this iterator, or null if the iterable is empty.
no setter
indexed Iterable<(int, T)>

Available on Iterable<T>, provided by the IterableExtensions extension

Pairs of elements of the indices and elements of this iterable.
no setter
lastOrNull → T?

Available on Iterable<T>, provided by the IterableExtensions extension

The last element of this iterable, or null if the iterable is empty.
no setter
singleOrNull → T?

Available on Iterable<T>, provided by the IterableExtensions extension

The single element of this iterator, or null.
no setter

Methods

elementAtOrNull(int index) → T?

Available on Iterable<T>, provided by the IterableExtensions extension

The element at position index of this iterable, or null.