thenByDescending
inline fun <T> Comparator<T>.thenByDescending(crossinline selector: (T) -> Comparable<*>?): Comparator<T>(source)
Creates a descending comparator using the primary comparator and the function to transform value to a Comparable instance for comparison.
Since Kotlin
1.0Samples
inline fun <T, K> Comparator<T>.thenByDescending(comparator: Comparator<in K>, crossinline selector: (T) -> K): Comparator<T>(source)
Creates a descending comparator comparing values after the primary comparator defined them equal. It uses the selector function to transform values and then compares them with the given comparator.