sortedByDescending method

_SortedList<E> sortedByDescending(
  1. Comparable selector(
    1. E element
    )
)

Returns a new list with all elements sorted according to descending natural sort order of the values returned by specified selector function.

To sort by more than one property, thenBy() or thenByDescending can be called afterwards.

Note: The actual sorting is performed when an element is accessed for the first time.

Implementation

_SortedList<E> sortedByDescending(Comparable Function(E element) selector) {
  return _SortedList<E>._withSelector(this, selector, -1, null);
}