naturalOrder<T> function

Comparator<T> naturalOrder<T>()

Returns a comparator that compares Comparable objects in natural order.

The natural order of a Comparable type here means the order established by its compareTo function.

Implementation

external Comparator<T> naturalOrder<T>();