KT-16602: Improve mutable sorting samples, fix sample references
This commit is contained in:
@@ -1818,7 +1818,7 @@ public fun <T> Array<out T>.sort(): Unit {
|
||||
*
|
||||
* The sort is _stable_. It means that equal elements preserve their order relative to each other after sorting.
|
||||
*
|
||||
* @sample samples.collections.Arrays.Sorting.sortRangeOfComparable
|
||||
* @sample samples.collections.Arrays.Sorting.sortRangeOfArrayOfComparable
|
||||
*/
|
||||
public fun <T> Array<out T>.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
java.util.Arrays.sort(this, fromIndex, toIndex)
|
||||
@@ -1827,7 +1827,7 @@ public fun <T> Array<out T>.sort(fromIndex: Int = 0, toIndex: Int = size): Unit
|
||||
/**
|
||||
* Sorts a range in the array in-place.
|
||||
*
|
||||
* @sample samples.collections.Arrays.Sorting.sortRangeOfComparable
|
||||
* @sample samples.collections.Arrays.Sorting.sortRangeOfArray
|
||||
*/
|
||||
public fun ByteArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
java.util.Arrays.sort(this, fromIndex, toIndex)
|
||||
@@ -1836,7 +1836,7 @@ public fun ByteArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
/**
|
||||
* Sorts a range in the array in-place.
|
||||
*
|
||||
* @sample samples.collections.Arrays.Sorting.sortRangeOfComparable
|
||||
* @sample samples.collections.Arrays.Sorting.sortRangeOfArray
|
||||
*/
|
||||
public fun ShortArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
java.util.Arrays.sort(this, fromIndex, toIndex)
|
||||
@@ -1845,7 +1845,7 @@ public fun ShortArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
/**
|
||||
* Sorts a range in the array in-place.
|
||||
*
|
||||
* @sample samples.collections.Arrays.Sorting.sortRangeOfComparable
|
||||
* @sample samples.collections.Arrays.Sorting.sortRangeOfArray
|
||||
*/
|
||||
public fun IntArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
java.util.Arrays.sort(this, fromIndex, toIndex)
|
||||
@@ -1854,7 +1854,7 @@ public fun IntArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
/**
|
||||
* Sorts a range in the array in-place.
|
||||
*
|
||||
* @sample samples.collections.Arrays.Sorting.sortRangeOfComparable
|
||||
* @sample samples.collections.Arrays.Sorting.sortRangeOfArray
|
||||
*/
|
||||
public fun LongArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
java.util.Arrays.sort(this, fromIndex, toIndex)
|
||||
@@ -1863,7 +1863,7 @@ public fun LongArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
/**
|
||||
* Sorts a range in the array in-place.
|
||||
*
|
||||
* @sample samples.collections.Arrays.Sorting.sortRangeOfComparable
|
||||
* @sample samples.collections.Arrays.Sorting.sortRangeOfArray
|
||||
*/
|
||||
public fun FloatArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
java.util.Arrays.sort(this, fromIndex, toIndex)
|
||||
@@ -1872,7 +1872,7 @@ public fun FloatArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
/**
|
||||
* Sorts a range in the array in-place.
|
||||
*
|
||||
* @sample samples.collections.Arrays.Sorting.sortRangeOfComparable
|
||||
* @sample samples.collections.Arrays.Sorting.sortRangeOfArray
|
||||
*/
|
||||
public fun DoubleArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
java.util.Arrays.sort(this, fromIndex, toIndex)
|
||||
@@ -1881,7 +1881,7 @@ public fun DoubleArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
/**
|
||||
* Sorts a range in the array in-place.
|
||||
*
|
||||
* @sample samples.collections.Arrays.Sorting.sortRangeOfComparable
|
||||
* @sample samples.collections.Arrays.Sorting.sortRangeOfArray
|
||||
*/
|
||||
public fun CharArray.sort(fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
java.util.Arrays.sort(this, fromIndex, toIndex)
|
||||
|
||||
Reference in New Issue
Block a user