open fun addComparator(comparator: Comparator<out T>): Unit
Add a Comparator to the end of the chain.
The Comparator will default to ascending sort order, unless it is a InvertibleComparator.
comparator - the Comparator to add to the end of the chain
See Also
InvertibleComparator
open fun addComparator(comparator: Comparator<out T>, ascending: Boolean): Unit
Add a Comparator to the end of the chain using the provided sort order.
comparator - the Comparator to add to the end of the chain
ascending - the sort order: ascending (true) or descending (false)