sort

open fun <T> sort(things: Iterable<out T>, comparator: Comparator<in T>): List<T>(source)

Returns a sorted copy of the provided collection of things. Uses the provided comparator to sort.


open fun <T : Comparable<T>?> sort(things: Iterable<T>): List<T>(source)

Returns a sorted copy of the provided collection of things. Uses the natural ordering of the things.