Drop previously deprecated API.
This commit is contained in:
@@ -990,24 +990,6 @@ public inline fun <T, K, V, M : MutableMap<in K, in V>> Iterable<T>.associateTo(
|
||||
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> Iterable<T>.toArrayList(): ArrayList<T> {
|
||||
if (this is Collection<T>)
|
||||
return ArrayList(this)
|
||||
return toCollection(ArrayList<T>())
|
||||
}
|
||||
|
||||
/**
|
||||
* 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> Collection<T>.toArrayList(): ArrayList<T> {
|
||||
return ArrayList(this)
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends all elements to the given [destination] collection.
|
||||
*/
|
||||
@@ -1032,31 +1014,6 @@ public fun <T> Iterable<T>.toList(): List<T> {
|
||||
return this.toMutableList()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given collection.
|
||||
* 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> Iterable<T>.toMap(selector: (T) -> K, transform: (T) -> 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> Iterable<T>.toMap(transform: (T) -> Pair<K, V>): Map<K, V> {
|
||||
return associate(transform)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <T, K> Iterable<T>.toMapBy(selector: (T) -> K): Map<K, T> {
|
||||
return associateBy(selector)
|
||||
}
|
||||
|
||||
@Deprecated("Use associateBy instead.", ReplaceWith("associateBy(selector, transform)"), level = DeprecationLevel.ERROR)
|
||||
public inline fun <T, K, V> Iterable<T>.toMapBy(selector: (T) -> K, transform: (T) -> V): Map<K, V> {
|
||||
return associateBy(selector, transform)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [MutableList] filled with all elements of this collection.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user