Drop previously deprecated API.
This commit is contained in:
@@ -6115,94 +6115,6 @@ public inline fun <K, V, M : MutableMap<in K, in V>> CharArray.associateTo(desti
|
||||
return destination
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an [ArrayList] of all elements.
|
||||
*/
|
||||
@Deprecated("Use toMutableList instead or toCollection(ArrayList()) if you need ArrayList's ensureCapacity and trimToSize.", ReplaceWith("toCollection(arrayListOf())"), level = DeprecationLevel.ERROR)
|
||||
public fun <T> Array<out T>.toArrayList(): ArrayList<T> {
|
||||
return ArrayList(this.asCollection())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an [ArrayList] of all elements.
|
||||
*/
|
||||
@Deprecated("Use toMutableList instead or toCollection(ArrayList()) if you need ArrayList's ensureCapacity and trimToSize.", ReplaceWith("toCollection(arrayListOf())"), level = DeprecationLevel.ERROR)
|
||||
public fun ByteArray.toArrayList(): ArrayList<Byte> {
|
||||
val list = ArrayList<Byte>(size)
|
||||
for (item in this) list.add(item)
|
||||
return list
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an [ArrayList] of all elements.
|
||||
*/
|
||||
@Deprecated("Use toMutableList instead or toCollection(ArrayList()) if you need ArrayList's ensureCapacity and trimToSize.", ReplaceWith("toCollection(arrayListOf())"), level = DeprecationLevel.ERROR)
|
||||
public fun ShortArray.toArrayList(): ArrayList<Short> {
|
||||
val list = ArrayList<Short>(size)
|
||||
for (item in this) list.add(item)
|
||||
return list
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an [ArrayList] of all elements.
|
||||
*/
|
||||
@Deprecated("Use toMutableList instead or toCollection(ArrayList()) if you need ArrayList's ensureCapacity and trimToSize.", ReplaceWith("toCollection(arrayListOf())"), level = DeprecationLevel.ERROR)
|
||||
public fun IntArray.toArrayList(): ArrayList<Int> {
|
||||
val list = ArrayList<Int>(size)
|
||||
for (item in this) list.add(item)
|
||||
return list
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an [ArrayList] of all elements.
|
||||
*/
|
||||
@Deprecated("Use toMutableList instead or toCollection(ArrayList()) if you need ArrayList's ensureCapacity and trimToSize.", ReplaceWith("toCollection(arrayListOf())"), level = DeprecationLevel.ERROR)
|
||||
public fun LongArray.toArrayList(): ArrayList<Long> {
|
||||
val list = ArrayList<Long>(size)
|
||||
for (item in this) list.add(item)
|
||||
return list
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an [ArrayList] of all elements.
|
||||
*/
|
||||
@Deprecated("Use toMutableList instead or toCollection(ArrayList()) if you need ArrayList's ensureCapacity and trimToSize.", ReplaceWith("toCollection(arrayListOf())"), level = DeprecationLevel.ERROR)
|
||||
public fun FloatArray.toArrayList(): ArrayList<Float> {
|
||||
val list = ArrayList<Float>(size)
|
||||
for (item in this) list.add(item)
|
||||
return list
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an [ArrayList] of all elements.
|
||||
*/
|
||||
@Deprecated("Use toMutableList instead or toCollection(ArrayList()) if you need ArrayList's ensureCapacity and trimToSize.", ReplaceWith("toCollection(arrayListOf())"), level = DeprecationLevel.ERROR)
|
||||
public fun DoubleArray.toArrayList(): ArrayList<Double> {
|
||||
val list = ArrayList<Double>(size)
|
||||
for (item in this) list.add(item)
|
||||
return list
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an [ArrayList] of all elements.
|
||||
*/
|
||||
@Deprecated("Use toMutableList instead or toCollection(ArrayList()) if you need ArrayList's ensureCapacity and trimToSize.", ReplaceWith("toCollection(arrayListOf())"), level = DeprecationLevel.ERROR)
|
||||
public fun BooleanArray.toArrayList(): ArrayList<Boolean> {
|
||||
val list = ArrayList<Boolean>(size)
|
||||
for (item in this) list.add(item)
|
||||
return list
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an [ArrayList] of all elements.
|
||||
*/
|
||||
@Deprecated("Use toMutableList instead or toCollection(ArrayList()) if you need ArrayList's ensureCapacity and trimToSize.", ReplaceWith("toCollection(arrayListOf())"), level = DeprecationLevel.ERROR)
|
||||
public fun CharArray.toArrayList(): ArrayList<Char> {
|
||||
val list = ArrayList<Char>(size)
|
||||
for (item in this) list.add(item)
|
||||
return list
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends all elements to the given [destination] collection.
|
||||
*/
|
||||
@@ -6419,231 +6331,6 @@ public fun CharArray.toList(): List<Char> {
|
||||
return this.toMutableList()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array.
|
||||
* If any two elements would have the same key returned by [selector] the last one gets added to the map.
|
||||
*/
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <T, K, V> Array<out T>.toMap(selector: (T) -> K, transform: (T) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array.
|
||||
* If any two elements would have the same key returned by [selector] the last one gets added to the map.
|
||||
*/
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K, V> ByteArray.toMap(selector: (Byte) -> K, transform: (Byte) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array.
|
||||
* If any two elements would have the same key returned by [selector] the last one gets added to the map.
|
||||
*/
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K, V> ShortArray.toMap(selector: (Short) -> K, transform: (Short) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array.
|
||||
* If any two elements would have the same key returned by [selector] the last one gets added to the map.
|
||||
*/
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K, V> IntArray.toMap(selector: (Int) -> K, transform: (Int) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array.
|
||||
* If any two elements would have the same key returned by [selector] the last one gets added to the map.
|
||||
*/
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K, V> LongArray.toMap(selector: (Long) -> K, transform: (Long) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array.
|
||||
* If any two elements would have the same key returned by [selector] the last one gets added to the map.
|
||||
*/
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K, V> FloatArray.toMap(selector: (Float) -> K, transform: (Float) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array.
|
||||
* If any two elements would have the same key returned by [selector] the last one gets added to the map.
|
||||
*/
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K, V> DoubleArray.toMap(selector: (Double) -> K, transform: (Double) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array.
|
||||
* If any two elements would have the same key returned by [selector] the last one gets added to the map.
|
||||
*/
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K, V> BooleanArray.toMap(selector: (Boolean) -> K, transform: (Boolean) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array.
|
||||
* If any two elements would have the same key returned by [selector] the last one gets added to the map.
|
||||
*/
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K, V> CharArray.toMap(selector: (Char) -> K, transform: (Char) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associate instead.", ReplaceWith("associate(transform)"), level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("toMapOfPairs")
|
||||
public inline fun <T, K, V> Array<out T>.toMap(transform: (T) -> Pair<K, V>): Map<K, V> {
|
||||
return associate(transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associate instead.", ReplaceWith("associate(transform)"), level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("toMapOfPairs")
|
||||
public inline fun <K, V> ByteArray.toMap(transform: (Byte) -> Pair<K, V>): Map<K, V> {
|
||||
return associate(transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associate instead.", ReplaceWith("associate(transform)"), level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("toMapOfPairs")
|
||||
public inline fun <K, V> ShortArray.toMap(transform: (Short) -> Pair<K, V>): Map<K, V> {
|
||||
return associate(transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associate instead.", ReplaceWith("associate(transform)"), level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("toMapOfPairs")
|
||||
public inline fun <K, V> IntArray.toMap(transform: (Int) -> Pair<K, V>): Map<K, V> {
|
||||
return associate(transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associate instead.", ReplaceWith("associate(transform)"), level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("toMapOfPairs")
|
||||
public inline fun <K, V> LongArray.toMap(transform: (Long) -> Pair<K, V>): Map<K, V> {
|
||||
return associate(transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associate instead.", ReplaceWith("associate(transform)"), level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("toMapOfPairs")
|
||||
public inline fun <K, V> FloatArray.toMap(transform: (Float) -> Pair<K, V>): Map<K, V> {
|
||||
return associate(transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associate instead.", ReplaceWith("associate(transform)"), level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("toMapOfPairs")
|
||||
public inline fun <K, V> DoubleArray.toMap(transform: (Double) -> Pair<K, V>): Map<K, V> {
|
||||
return associate(transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associate instead.", ReplaceWith("associate(transform)"), level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("toMapOfPairs")
|
||||
public inline fun <K, V> BooleanArray.toMap(transform: (Boolean) -> Pair<K, V>): Map<K, V> {
|
||||
return associate(transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associate instead.", ReplaceWith("associate(transform)"), level = DeprecationLevel.ERROR)
|
||||
@kotlin.jvm.JvmName("toMapOfPairs")
|
||||
public inline fun <K, V> CharArray.toMap(transform: (Char) -> Pair<K, V>): Map<K, V> {
|
||||
return associate(transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <T, K> Array<out T>.toMapBy(selector: (T) -> K): Map<K, T> {
|
||||
return associateBy(selector)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K> ByteArray.toMapBy(selector: (Byte) -> K): Map<K, Byte> {
|
||||
return associateBy(selector)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K> ShortArray.toMapBy(selector: (Short) -> K): Map<K, Short> {
|
||||
return associateBy(selector)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K> IntArray.toMapBy(selector: (Int) -> K): Map<K, Int> {
|
||||
return associateBy(selector)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K> LongArray.toMapBy(selector: (Long) -> K): Map<K, Long> {
|
||||
return associateBy(selector)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K> FloatArray.toMapBy(selector: (Float) -> K): Map<K, Float> {
|
||||
return associateBy(selector)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K> DoubleArray.toMapBy(selector: (Double) -> K): Map<K, Double> {
|
||||
return associateBy(selector)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K> BooleanArray.toMapBy(selector: (Boolean) -> K): Map<K, Boolean> {
|
||||
return associateBy(selector)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K> CharArray.toMapBy(selector: (Char) -> K): Map<K, Char> {
|
||||
return associateBy(selector)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <T, K, V> Array<out T>.toMapBy(selector: (T) -> K, transform: (T) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K, V> ByteArray.toMapBy(selector: (Byte) -> K, transform: (Byte) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K, V> ShortArray.toMapBy(selector: (Short) -> K, transform: (Short) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K, V> IntArray.toMapBy(selector: (Int) -> K, transform: (Int) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K, V> LongArray.toMapBy(selector: (Long) -> K, transform: (Long) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K, V> FloatArray.toMapBy(selector: (Float) -> K, transform: (Float) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K, V> DoubleArray.toMapBy(selector: (Double) -> K, transform: (Double) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K, V> BooleanArray.toMapBy(selector: (Boolean) -> K, transform: (Boolean) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <K, V> CharArray.toMapBy(selector: (Char) -> K, transform: (Char) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [MutableList] filled with all elements of this array.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user