Temporary move std-lib deprecated back to MutableCollections (due to backward compatibility stuff)
This commit is contained in:
@@ -18,69 +18,6 @@
|
||||
|
||||
package kotlin
|
||||
|
||||
@Deprecated("Use property 'size' instead", ReplaceWith("this.size"))
|
||||
public inline fun Collection<*>.size() = size
|
||||
|
||||
@Deprecated("Use property 'size' instead", ReplaceWith("this.size"))
|
||||
public inline fun Map<*, *>.size() = size
|
||||
|
||||
@Deprecated("Use property 'key' instead", ReplaceWith("this.key"))
|
||||
public fun <K, V> Map.Entry<K, V>.getKey(): K = key
|
||||
|
||||
@Deprecated("Use property 'value' instead", ReplaceWith("this.value"))
|
||||
public fun <K, V> Map.Entry<K, V>.getValue(): V = value
|
||||
|
||||
@Deprecated("Use 'removeAt' instead", ReplaceWith("this.removeAt(index)"))
|
||||
public fun <E> MutableList<E>.remove(index: Int): E = removeAt(index)
|
||||
|
||||
@Deprecated("Use explicit cast to MutableCollection<Any?> instead", ReplaceWith("(this as MutableCollection<Any?>).remove(o)"))
|
||||
public fun <E> MutableCollection<E>.remove(o: Any?): Boolean = remove(o as E)
|
||||
|
||||
@Deprecated("Use explicit cast to MutableCollection<Any?> instead", ReplaceWith("(this as MutableCollection<Any?>).removeAll(c)"))
|
||||
public fun <E> MutableCollection<E>.removeAll(c: Collection<Any?>): Boolean = removeAll(c as Collection<E>)
|
||||
|
||||
@Deprecated("Use explicit cast to MutableCollection<Any?> instead", ReplaceWith("(this as MutableCollection<Any?>).retainAll(c)"))
|
||||
public fun <E> MutableCollection<E>.retainAll(c: Collection<Any?>): Boolean = retainAll(c as Collection<E>)
|
||||
|
||||
@Deprecated("Use explicit cast to List<Any?> instead", ReplaceWith("(this as List<Any?>).indexOf(o)"))
|
||||
public fun <E> List<E>.indexOf(o: Any?): Int = indexOf(o as E)
|
||||
|
||||
@Deprecated("Use explicit cast to List<Any?> instead", ReplaceWith("(this as List<Any?>).lastIndexOf(o)"))
|
||||
public fun <E> List<E>.lastIndexOf(o: Any?): Int = lastIndexOf(o as E)
|
||||
|
||||
@Deprecated("Use property 'length' instead", ReplaceWith("this.length"))
|
||||
public fun CharSequence.length(): Int = length
|
||||
|
||||
@Deprecated("Use explicit cast to Map<Any?, V> instead", ReplaceWith("(this as Map<Any?, V>).get(o)"))
|
||||
public inline operator fun <K, V> Map<K, V>.get(o: Any?): V? = get(o as K)
|
||||
|
||||
@Deprecated("Use explicit cast to Map<Any?, V> instead", ReplaceWith("(this as Map<Any?, V>).containsKey(o)"))
|
||||
public inline fun <K, V> Map<K, V>.containsKey(o: Any?): Boolean = containsKey(o as K)
|
||||
|
||||
@Deprecated("Use explicit cast to Map<K, Any?> instead", ReplaceWith("(this as Map<K, Any?>).containsValue(o)"))
|
||||
public inline fun <K, V> Map<K, V>.containsValue(o: Any?): Boolean = containsValue(o as V)
|
||||
|
||||
@Deprecated("Use property 'keys' instead", ReplaceWith("this.keys"))
|
||||
public inline fun <K, V> Map<K, V>.keySet(): Set<K> = keys
|
||||
|
||||
@kotlin.jvm.JvmName("mutableKeys")
|
||||
@Deprecated("Use property 'keys' instead", ReplaceWith("this.keys"))
|
||||
public inline fun <K, V> MutableMap<K, V>.keySet(): MutableSet<K> = keys
|
||||
|
||||
@Deprecated("Use property 'entries' instead", ReplaceWith("this.entries"))
|
||||
public inline fun <K, V> Map<K, V>.entrySet(): Set<Map.Entry<K, V>> = entries
|
||||
|
||||
@kotlin.jvm.JvmName("mutableEntrySet")
|
||||
@Deprecated("Use property 'entries' instead", ReplaceWith("this.entries"))
|
||||
public inline fun <K, V> MutableMap<K, V>.entrySet(): MutableSet<MutableMap.MutableEntry<K, V>> = entries
|
||||
|
||||
@Deprecated("Use property 'values' instead", ReplaceWith("this.values"))
|
||||
public inline fun <K, V> Map<K, V>.values(): Collection<V> = values
|
||||
|
||||
@kotlin.jvm.JvmName("mutableValues")
|
||||
@Deprecated("Use property 'values' instead", ReplaceWith("this.values"))
|
||||
public inline fun <K, V> MutableMap<K, V>.values(): MutableCollection<V> = values
|
||||
|
||||
@Deprecated("Use property 'message' instead", ReplaceWith("this.message"))
|
||||
public inline fun Throwable.getMessage(): String? = message
|
||||
|
||||
|
||||
@@ -6,6 +6,69 @@ package kotlin
|
||||
@Deprecated("Use operator 'get' instead", ReplaceWith("this[index]"))
|
||||
public fun CharSequence.charAt(index: Int): Char = this[index]
|
||||
|
||||
@Deprecated("Use property 'size' instead", ReplaceWith("this.size"))
|
||||
public inline fun Collection<*>.size() = size
|
||||
|
||||
@Deprecated("Use property 'size' instead", ReplaceWith("this.size"))
|
||||
public inline fun Map<*, *>.size() = size
|
||||
|
||||
@Deprecated("Use property 'key' instead", ReplaceWith("this.key"))
|
||||
public fun <K, V> Map.Entry<K, V>.getKey(): K = key
|
||||
|
||||
@Deprecated("Use property 'value' instead", ReplaceWith("this.value"))
|
||||
public fun <K, V> Map.Entry<K, V>.getValue(): V = value
|
||||
|
||||
@Deprecated("Use 'removeAt' instead", ReplaceWith("this.removeAt(index)"))
|
||||
public fun <E> MutableList<E>.remove(index: Int): E = removeAt(index)
|
||||
|
||||
@Deprecated("Use explicit cast to MutableCollection<Any?> instead", ReplaceWith("(this as MutableCollection<Any?>).remove(o)"))
|
||||
public fun <E> MutableCollection<E>.remove(o: Any?): Boolean = remove(o as E)
|
||||
|
||||
@Deprecated("Use explicit cast to MutableCollection<Any?> instead", ReplaceWith("(this as MutableCollection<Any?>).removeAll(c)"))
|
||||
public fun <E> MutableCollection<E>.removeAll(c: Collection<Any?>): Boolean = removeAll(c as Collection<E>)
|
||||
|
||||
@Deprecated("Use explicit cast to MutableCollection<Any?> instead", ReplaceWith("(this as MutableCollection<Any?>).retainAll(c)"))
|
||||
public fun <E> MutableCollection<E>.retainAll(c: Collection<Any?>): Boolean = retainAll(c as Collection<E>)
|
||||
|
||||
@Deprecated("Use explicit cast to List<Any?> instead", ReplaceWith("(this as List<Any?>).indexOf(o)"))
|
||||
public fun <E> List<E>.indexOf(o: Any?): Int = indexOf(o as E)
|
||||
|
||||
@Deprecated("Use explicit cast to List<Any?> instead", ReplaceWith("(this as List<Any?>).lastIndexOf(o)"))
|
||||
public fun <E> List<E>.lastIndexOf(o: Any?): Int = lastIndexOf(o as E)
|
||||
|
||||
@Deprecated("Use property 'length' instead", ReplaceWith("this.length"))
|
||||
public fun CharSequence.length(): Int = length
|
||||
|
||||
@Deprecated("Use explicit cast to Map<Any?, V> instead", ReplaceWith("(this as Map<Any?, V>).get(o)"))
|
||||
public inline operator fun <K, V> Map<K, V>.get(o: Any?): V? = get(o as K)
|
||||
|
||||
@Deprecated("Use explicit cast to Map<Any?, V> instead", ReplaceWith("(this as Map<Any?, V>).containsKey(o)"))
|
||||
public inline fun <K, V> Map<K, V>.containsKey(o: Any?): Boolean = containsKey(o as K)
|
||||
|
||||
@Deprecated("Use explicit cast to Map<K, Any?> instead", ReplaceWith("(this as Map<K, Any?>).containsValue(o)"))
|
||||
public inline fun <K, V> Map<K, V>.containsValue(o: Any?): Boolean = containsValue(o as V)
|
||||
|
||||
@Deprecated("Use property 'keys' instead", ReplaceWith("this.keys"))
|
||||
public inline fun <K, V> Map<K, V>.keySet(): Set<K> = keys
|
||||
|
||||
@kotlin.jvm.JvmName("mutableKeys")
|
||||
@Deprecated("Use property 'keys' instead", ReplaceWith("this.keys"))
|
||||
public inline fun <K, V> MutableMap<K, V>.keySet(): MutableSet<K> = keys
|
||||
|
||||
@Deprecated("Use property 'entries' instead", ReplaceWith("this.entries"))
|
||||
public inline fun <K, V> Map<K, V>.entrySet(): Set<Map.Entry<K, V>> = entries
|
||||
|
||||
@kotlin.jvm.JvmName("mutableEntrySet")
|
||||
@Deprecated("Use property 'entries' instead", ReplaceWith("this.entries"))
|
||||
public inline fun <K, V> MutableMap<K, V>.entrySet(): MutableSet<MutableMap.MutableEntry<K, V>> = entries
|
||||
|
||||
@Deprecated("Use property 'values' instead", ReplaceWith("this.values"))
|
||||
public inline fun <K, V> Map<K, V>.values(): Collection<V> = values
|
||||
|
||||
@kotlin.jvm.JvmName("mutableValues")
|
||||
@Deprecated("Use property 'values' instead", ReplaceWith("this.values"))
|
||||
public inline fun <K, V> MutableMap<K, V>.values(): MutableCollection<V> = values
|
||||
|
||||
/**
|
||||
* Adds the specified [element] to this mutable collection.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user