thenWith method
Returns a new list with all elements sorted according to previously
defined order and specified comparator
.
Note: The actual sorting is performed when an element is accessed for the first time.
Implementation
SortedList<E> thenWith(Comparator<E> comparator) {
return SortedList<E>(this, _comparator.compose(comparator));
}