Drop deprecated sequence() and withIndices()
This commit is contained in:
@@ -6900,87 +6900,6 @@ public fun ShortArray.withIndex(): Iterable<IndexedValue<Short>> {
|
||||
return IndexingIterable { iterator() }
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list containing pairs of each element of the original collection and their index.
|
||||
*/
|
||||
@Deprecated("Use withIndex() instead.")
|
||||
public fun <T> Array<out T>.withIndices(): List<Pair<Int, T>> {
|
||||
var index = 0
|
||||
return mapTo(ArrayList<Pair<Int, T>>(), { index++ to it })
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list containing pairs of each element of the original collection and their index.
|
||||
*/
|
||||
@Deprecated("Use withIndex() instead.")
|
||||
public fun BooleanArray.withIndices(): List<Pair<Int, Boolean>> {
|
||||
var index = 0
|
||||
return mapTo(ArrayList<Pair<Int, Boolean>>(), { index++ to it })
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list containing pairs of each element of the original collection and their index.
|
||||
*/
|
||||
@Deprecated("Use withIndex() instead.")
|
||||
public fun ByteArray.withIndices(): List<Pair<Int, Byte>> {
|
||||
var index = 0
|
||||
return mapTo(ArrayList<Pair<Int, Byte>>(), { index++ to it })
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list containing pairs of each element of the original collection and their index.
|
||||
*/
|
||||
@Deprecated("Use withIndex() instead.")
|
||||
public fun CharArray.withIndices(): List<Pair<Int, Char>> {
|
||||
var index = 0
|
||||
return mapTo(ArrayList<Pair<Int, Char>>(), { index++ to it })
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list containing pairs of each element of the original collection and their index.
|
||||
*/
|
||||
@Deprecated("Use withIndex() instead.")
|
||||
public fun DoubleArray.withIndices(): List<Pair<Int, Double>> {
|
||||
var index = 0
|
||||
return mapTo(ArrayList<Pair<Int, Double>>(), { index++ to it })
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list containing pairs of each element of the original collection and their index.
|
||||
*/
|
||||
@Deprecated("Use withIndex() instead.")
|
||||
public fun FloatArray.withIndices(): List<Pair<Int, Float>> {
|
||||
var index = 0
|
||||
return mapTo(ArrayList<Pair<Int, Float>>(), { index++ to it })
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list containing pairs of each element of the original collection and their index.
|
||||
*/
|
||||
@Deprecated("Use withIndex() instead.")
|
||||
public fun IntArray.withIndices(): List<Pair<Int, Int>> {
|
||||
var index = 0
|
||||
return mapTo(ArrayList<Pair<Int, Int>>(), { index++ to it })
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list containing pairs of each element of the original collection and their index.
|
||||
*/
|
||||
@Deprecated("Use withIndex() instead.")
|
||||
public fun LongArray.withIndices(): List<Pair<Int, Long>> {
|
||||
var index = 0
|
||||
return mapTo(ArrayList<Pair<Int, Long>>(), { index++ to it })
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list containing pairs of each element of the original collection and their index.
|
||||
*/
|
||||
@Deprecated("Use withIndex() instead.")
|
||||
public fun ShortArray.withIndices(): List<Pair<Int, Short>> {
|
||||
var index = 0
|
||||
return mapTo(ArrayList<Pair<Int, Short>>(), { index++ to it })
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list containing only distinct elements from the given collection.
|
||||
* The elements in the resulting list are in the same order as they were in the source collection.
|
||||
@@ -10359,78 +10278,6 @@ public fun ShortArray.asSequence(): Sequence<Short> {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a sequence from the given collection
|
||||
*/
|
||||
@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()"))
|
||||
public fun <T> Array<out T>.sequence(): Sequence<T> {
|
||||
return asSequence()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a sequence from the given collection
|
||||
*/
|
||||
@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()"))
|
||||
public fun BooleanArray.sequence(): Sequence<Boolean> {
|
||||
return asSequence()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a sequence from the given collection
|
||||
*/
|
||||
@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()"))
|
||||
public fun ByteArray.sequence(): Sequence<Byte> {
|
||||
return asSequence()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a sequence from the given collection
|
||||
*/
|
||||
@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()"))
|
||||
public fun CharArray.sequence(): Sequence<Char> {
|
||||
return asSequence()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a sequence from the given collection
|
||||
*/
|
||||
@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()"))
|
||||
public fun DoubleArray.sequence(): Sequence<Double> {
|
||||
return asSequence()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a sequence from the given collection
|
||||
*/
|
||||
@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()"))
|
||||
public fun FloatArray.sequence(): Sequence<Float> {
|
||||
return asSequence()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a sequence from the given collection
|
||||
*/
|
||||
@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()"))
|
||||
public fun IntArray.sequence(): Sequence<Int> {
|
||||
return asSequence()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a sequence from the given collection
|
||||
*/
|
||||
@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()"))
|
||||
public fun LongArray.sequence(): Sequence<Long> {
|
||||
return asSequence()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a sequence from the given collection
|
||||
*/
|
||||
@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()"))
|
||||
public fun ShortArray.sequence(): Sequence<Short> {
|
||||
return asSequence()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [List] that wraps the original array.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user