IterableComparableExtension<T extends Comparable<T> > extension
Null safety
Extensions that apply to iterables of Comparable elements.
These operations can assume that the elements have a natural ordering, and can therefore omit, or make it optional, for the user to provide a Comparator.
- on
-
- Iterable<
T>
- Iterable<
Properties
Methods
-
isSorted(
[Comparator< T> ? compare]) → bool -
Whether the elements are sorted by the
compare
ordering. -
sorted(
[Comparator< T> ? compare]) → List<T> - Creates a sorted list of the elements of the iterable.