Promote ArrayDeque and MutableList.removeFirst/LastOrNull to stable
This commit is contained in:
@@ -6593,20 +6593,20 @@ public fun <T> kotlin.collections.MutableIterable<T>.removeAll(predicate: (T) ->
|
||||
|
||||
public fun <T> kotlin.collections.MutableList<T>.removeAll(predicate: (T) -> kotlin.Boolean): kotlin.Boolean
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalStdlibApi
|
||||
@kotlin.SinceKotlin(version = "1.4")
|
||||
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||
public fun <T> kotlin.collections.MutableList<T>.removeFirst(): T
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalStdlibApi
|
||||
@kotlin.SinceKotlin(version = "1.4")
|
||||
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||
public fun <T> kotlin.collections.MutableList<T>.removeFirstOrNull(): T?
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalStdlibApi
|
||||
@kotlin.SinceKotlin(version = "1.4")
|
||||
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||
public fun <T> kotlin.collections.MutableList<T>.removeLast(): T
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalStdlibApi
|
||||
@kotlin.SinceKotlin(version = "1.4")
|
||||
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||
public fun <T> kotlin.collections.MutableList<T>.removeLastOrNull(): T?
|
||||
|
||||
public fun <T : kotlin.Any> kotlin.Array<T?>.requireNoNulls(): kotlin.Array<T>
|
||||
@@ -9716,8 +9716,8 @@ public abstract class AbstractSet<out E> : kotlin.collections.AbstractCollection
|
||||
public open override fun hashCode(): kotlin.Int
|
||||
}
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalStdlibApi
|
||||
@kotlin.SinceKotlin(version = "1.4")
|
||||
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||
public final class ArrayDeque<E> : kotlin.collections.AbstractMutableList<E> {
|
||||
public constructor ArrayDeque<E>()
|
||||
|
||||
|
||||
@@ -6563,20 +6563,20 @@ public fun <T> kotlin.collections.MutableIterable<T>.removeAll(predicate: (T) ->
|
||||
|
||||
public fun <T> kotlin.collections.MutableList<T>.removeAll(predicate: (T) -> kotlin.Boolean): kotlin.Boolean
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalStdlibApi
|
||||
@kotlin.SinceKotlin(version = "1.4")
|
||||
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||
public fun <T> kotlin.collections.MutableList<T>.removeFirst(): T
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalStdlibApi
|
||||
@kotlin.SinceKotlin(version = "1.4")
|
||||
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||
public fun <T> kotlin.collections.MutableList<T>.removeFirstOrNull(): T?
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalStdlibApi
|
||||
@kotlin.SinceKotlin(version = "1.4")
|
||||
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||
public fun <T> kotlin.collections.MutableList<T>.removeLast(): T
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalStdlibApi
|
||||
@kotlin.SinceKotlin(version = "1.4")
|
||||
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||
public fun <T> kotlin.collections.MutableList<T>.removeLastOrNull(): T?
|
||||
|
||||
public fun <T : kotlin.Any> kotlin.Array<T?>.requireNoNulls(): kotlin.Array<T>
|
||||
@@ -9680,8 +9680,8 @@ public abstract class AbstractSet<out E> : kotlin.collections.AbstractCollection
|
||||
public open override fun hashCode(): kotlin.Int
|
||||
}
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalStdlibApi
|
||||
@kotlin.SinceKotlin(version = "1.4")
|
||||
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class})
|
||||
public final class ArrayDeque<E> : kotlin.collections.AbstractMutableList<E> {
|
||||
public constructor ArrayDeque<E>()
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ package kotlin.collections
|
||||
* The collection provide methods for convenient access to the both ends.
|
||||
* It also implements [MutableList] interface and supports efficient get/set operations by index.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
public class ArrayDeque<E> : AbstractMutableList<E> {
|
||||
private var head: Int = 0
|
||||
private var elementData: Array<Any?>
|
||||
|
||||
@@ -236,29 +236,29 @@ public inline fun <T> MutableList<T>.remove(index: Int): T = removeAt(index)
|
||||
/**
|
||||
* Removes the first element from this mutable list and returns that removed element, or throws [NoSuchElementException] if this list is empty.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
public fun <T> MutableList<T>.removeFirst(): T = if (isEmpty()) throw NoSuchElementException("List is empty.") else removeAt(0)
|
||||
|
||||
/**
|
||||
* Removes the first element from this mutable list and returns that removed element, or returns `null` if this list is empty.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
public fun <T> MutableList<T>.removeFirstOrNull(): T? = if (isEmpty()) null else removeAt(0)
|
||||
|
||||
/**
|
||||
* Removes the last element from this mutable list and returns that removed element, or throws [NoSuchElementException] if this list is empty.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
public fun <T> MutableList<T>.removeLast(): T = if (isEmpty()) throw NoSuchElementException("List is empty.") else removeAt(lastIndex)
|
||||
|
||||
/**
|
||||
* Removes the last element from this mutable list and returns that removed element, or returns `null` if this list is empty.
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.4")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
public fun <T> MutableList<T>.removeLastOrNull(): T? = if (isEmpty()) null else removeAt(lastIndex)
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user