ComparableCoralElementsExtension<E extends Comparable> extension

on
  • CoralIterableElements<E>

Properties

max → Coral<E>

Available on CoralIterableElements<E>, provided by the ComparableCoralElementsExtension extension

Returns the maximum element in this collection, or throws StateError if empty.
no setter
maxOrNull → Coral<E?>

Available on CoralIterableElements<E>, provided by the ComparableCoralElementsExtension extension

Returns the maximum element in this collection, or null if empty.
no setter
min → Coral<E>

Available on CoralIterableElements<E>, provided by the ComparableCoralElementsExtension extension

Returns the minimum element in this collection, or throws StateError if empty.
no setter
minOrNull → Coral<E?>

Available on CoralIterableElements<E>, provided by the ComparableCoralElementsExtension extension

Returns the minimum element in this collection, or null if empty.
no setter
sorted → Coral<List<E>>

Available on CoralIterableElements<E>, provided by the ComparableCoralElementsExtension extension

Returns a new list containing the elements of this collection sorted in ascending order.
no setter
sortedDescending → Coral<List<E>>

Available on CoralIterableElements<E>, provided by the ComparableCoralElementsExtension extension

Returns a new list containing the elements of this collection sorted in descending order.
no setter

Methods

isSorted([int compare(E a, E b)?]) → Coral<bool>

Available on CoralIterableElements<E>, provided by the ComparableCoralElementsExtension extension

Returns true if this collection is sorted in ascending order.