Get rid of platform differences in MutableList.sortWith() doc
This commit is contained in:
committed by
Space
parent
a9946b01e6
commit
c64592665b
@@ -18,6 +18,8 @@ public actual fun <T : Comparable<T>> MutableList<T>.sort(): Unit = sortWith(nat
|
||||
* Sorts elements in the list in-place according to the order specified with [comparator].
|
||||
*
|
||||
* The sort is _stable_. It means that equal elements preserve their order relative to each other after sorting.
|
||||
*
|
||||
* @sample samples.collections.Collections.Sorting.sortMutableListWith
|
||||
*/
|
||||
public actual fun <T> MutableList<T>.sortWith(comparator: Comparator<in T>): Unit {
|
||||
if (size > 1) {
|
||||
|
||||
@@ -159,6 +159,8 @@ public actual fun <T : Comparable<T>> MutableList<T>.sort(): Unit {
|
||||
* Sorts elements in the list in-place according to the order specified with [comparator].
|
||||
*
|
||||
* The sort is _stable_. It means that equal elements preserve their order relative to each other after sorting.
|
||||
*
|
||||
* @sample samples.collections.Collections.Sorting.sortMutableListWith
|
||||
*/
|
||||
public actual fun <T> MutableList<T>.sortWith(comparator: Comparator<in T>): Unit {
|
||||
collectionsSort(this, comparator)
|
||||
|
||||
Reference in New Issue
Block a user