Update generated stdlib code
- imports - sample refs - copyrights
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package kotlin.collections
|
||||
@@ -10,6 +10,8 @@ package kotlin.collections
|
||||
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
||||
//
|
||||
|
||||
import kotlin.ranges.contains
|
||||
import kotlin.ranges.reversed
|
||||
|
||||
/**
|
||||
* Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array.
|
||||
@@ -1628,6 +1630,8 @@ public actual inline fun <T> Array<T>.plusElement(element: T): Array<T> {
|
||||
|
||||
/**
|
||||
* Sorts the array in-place.
|
||||
*
|
||||
* @sample samples.collections.Arrays.Sorting.sortArray
|
||||
*/
|
||||
public actual fun IntArray.sort(): Unit {
|
||||
if (size > 1) sortArray(this)
|
||||
@@ -1635,6 +1639,8 @@ public actual fun IntArray.sort(): Unit {
|
||||
|
||||
/**
|
||||
* Sorts the array in-place.
|
||||
*
|
||||
* @sample samples.collections.Arrays.Sorting.sortArray
|
||||
*/
|
||||
public actual fun LongArray.sort(): Unit {
|
||||
if (size > 1) sortArray(this)
|
||||
@@ -1642,6 +1648,8 @@ public actual fun LongArray.sort(): Unit {
|
||||
|
||||
/**
|
||||
* Sorts the array in-place.
|
||||
*
|
||||
* @sample samples.collections.Arrays.Sorting.sortArray
|
||||
*/
|
||||
public actual fun ByteArray.sort(): Unit {
|
||||
if (size > 1) sortArray(this)
|
||||
@@ -1649,6 +1657,8 @@ public actual fun ByteArray.sort(): Unit {
|
||||
|
||||
/**
|
||||
* Sorts the array in-place.
|
||||
*
|
||||
* @sample samples.collections.Arrays.Sorting.sortArray
|
||||
*/
|
||||
public actual fun ShortArray.sort(): Unit {
|
||||
if (size > 1) sortArray(this)
|
||||
@@ -1656,6 +1666,8 @@ public actual fun ShortArray.sort(): Unit {
|
||||
|
||||
/**
|
||||
* Sorts the array in-place.
|
||||
*
|
||||
* @sample samples.collections.Arrays.Sorting.sortArray
|
||||
*/
|
||||
public actual fun DoubleArray.sort(): Unit {
|
||||
if (size > 1) sortArray(this)
|
||||
@@ -1663,6 +1675,8 @@ public actual fun DoubleArray.sort(): Unit {
|
||||
|
||||
/**
|
||||
* Sorts the array in-place.
|
||||
*
|
||||
* @sample samples.collections.Arrays.Sorting.sortArray
|
||||
*/
|
||||
public actual fun FloatArray.sort(): Unit {
|
||||
if (size > 1) sortArray(this)
|
||||
@@ -1670,6 +1684,8 @@ public actual fun FloatArray.sort(): Unit {
|
||||
|
||||
/**
|
||||
* Sorts the array in-place.
|
||||
*
|
||||
* @sample samples.collections.Arrays.Sorting.sortArray
|
||||
*/
|
||||
public actual fun CharArray.sort(): Unit {
|
||||
if (size > 1) sortArray(this)
|
||||
@@ -1679,6 +1695,8 @@ public actual fun CharArray.sort(): Unit {
|
||||
* Sorts the array in-place according to the natural order of its elements.
|
||||
*
|
||||
* The sort is _stable_. It means that equal elements preserve their order relative to each other after sorting.
|
||||
*
|
||||
* @sample samples.collections.Arrays.Sorting.sortArrayOfComparable
|
||||
*/
|
||||
public actual fun <T : Comparable<T>> Array<out T>.sort(): Unit {
|
||||
if (size > 1) sortArray(this)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package kotlin.collections
|
||||
@@ -10,6 +10,8 @@ package kotlin.collections
|
||||
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
||||
//
|
||||
|
||||
import kotlin.ranges.contains
|
||||
import kotlin.ranges.reversed
|
||||
|
||||
/**
|
||||
* Reverses elements in the list in-place.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package kotlin.comparisons
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package kotlin.text
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package kotlin.collections
|
||||
@@ -10,6 +10,8 @@ package kotlin.collections
|
||||
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
||||
//
|
||||
|
||||
import kotlin.ranges.contains
|
||||
import kotlin.ranges.reversed
|
||||
|
||||
/**
|
||||
* Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array.
|
||||
@@ -122,3 +124,4 @@ public actual fun UShortArray.asList(): List<UShort> {
|
||||
override fun lastIndexOf(element: UShort): Int = this@asList.lastIndexOf(element)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user