sort

fun sort(comparator: Comparator<in T>)

Sorts this list by given comparator.

Parameters

comparator

Comparator to be applied. If the elements contained in this list implement the comparable interface, pass null.