typealias Comparator<T> = Comparator<T>
Provides a comparison function for imposing a total ordering between instances of the type T.
Compares its two arguments for order. Returns zero if the arguments are equal, a negative number if the first argument is less than the second, or a positive number if the first argument is greater than the second.
abstract fun compare(a: T, b: T): Int
Creates a comparator comparing values after the primary comparator defined them equal. It uses the function to transform value to a Comparable instance for comparison.
Creates a descending comparator using the primary comparator and the function to transform value to a Comparable instance for comparison.