Kotlin HashSet sortedByDescending()
Syntax & Examples
Syntax of HashSet.sortedByDescending()
The syntax of HashSet.sortedByDescending() extension function is:
fun <T, R : Comparable<R>> Iterable<T>.sortedByDescending( selector: (T) -> R? ): List<T>
This sortedByDescending() extension function of HashSet returns a list of all elements sorted descending according to natural sort order of the value returned by specified selector function.