Make mutation methods in AbstractMutable-collections abstract rather than implement them unsupported.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
@file:JvmVersion
|
||||
package kotlin.collections
|
||||
|
||||
import java.util.AbstractCollection
|
||||
|
||||
public abstract class AbstractMutableCollection<E> protected constructor() : AbstractCollection<E>() {
|
||||
abstract override fun add(element: E): Boolean
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
@file:JvmVersion
|
||||
package kotlin.collections
|
||||
|
||||
import java.util.AbstractList
|
||||
|
||||
public abstract class AbstractMutableList<E> protected constructor() : AbstractList<E>() {
|
||||
abstract override fun set(index: Int, element: E): E
|
||||
abstract override fun removeAt(index: Int): E
|
||||
abstract override fun add(index: Int, element: E)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
@file:JvmVersion
|
||||
package kotlin.collections
|
||||
|
||||
import java.util.AbstractMap
|
||||
|
||||
public abstract class AbstractMutableMap<K, V> protected constructor() : AbstractMap<K, V>() {
|
||||
abstract override fun put(key: K, value: V): V?
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
@file:JvmVersion
|
||||
package kotlin.collections
|
||||
|
||||
import java.util.AbstractSet
|
||||
|
||||
public abstract class AbstractMutableSet<E> protected constructor() : AbstractSet<E>() {
|
||||
// nothing to make abstract, maybe leave it typealias then?
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
@file:JvmVersion
|
||||
package kotlin.collections
|
||||
|
||||
public typealias AbstractMutableCollection<E> = java.util.AbstractCollection<E>
|
||||
public typealias AbstractMutableList<E> = java.util.AbstractList<E>
|
||||
public typealias AbstractMutableSet<E> = java.util.AbstractSet<E>
|
||||
public typealias AbstractMutableMap<K, V> = java.util.AbstractMap<K, V>
|
||||
@@ -149,6 +149,42 @@ public abstract class kotlin/collections/AbstractMap : java/util/Map, kotlin/jvm
|
||||
public final fun values ()Ljava/util/Collection;
|
||||
}
|
||||
|
||||
public abstract class kotlin/collections/AbstractMutableCollection : java/util/AbstractCollection {
|
||||
protected fun <init> ()V
|
||||
public abstract fun add (Ljava/lang/Object;)Z
|
||||
public abstract fun getSize ()I
|
||||
public final fun size ()I
|
||||
}
|
||||
|
||||
public abstract class kotlin/collections/AbstractMutableList : java/util/AbstractList {
|
||||
protected fun <init> ()V
|
||||
public abstract fun add (ILjava/lang/Object;)V
|
||||
public abstract fun getSize ()I
|
||||
public final fun remove (I)Ljava/lang/Object;
|
||||
public abstract fun removeAt (I)Ljava/lang/Object;
|
||||
public abstract fun set (ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public final fun size ()I
|
||||
}
|
||||
|
||||
public abstract class kotlin/collections/AbstractMutableMap : java/util/AbstractMap {
|
||||
protected fun <init> ()V
|
||||
public final fun entrySet ()Ljava/util/Set;
|
||||
public abstract fun getEntries ()Ljava/util/Set;
|
||||
public fun getKeys ()Ljava/util/Set;
|
||||
public fun getSize ()I
|
||||
public fun getValues ()Ljava/util/Collection;
|
||||
public final fun keySet ()Ljava/util/Set;
|
||||
public abstract fun put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public final fun size ()I
|
||||
public final fun values ()Ljava/util/Collection;
|
||||
}
|
||||
|
||||
public abstract class kotlin/collections/AbstractMutableSet : java/util/AbstractSet {
|
||||
protected fun <init> ()V
|
||||
public abstract fun getSize ()I
|
||||
public final fun size ()I
|
||||
}
|
||||
|
||||
public abstract class kotlin/collections/AbstractSet : kotlin/collections/AbstractCollection, java/util/Set, kotlin/jvm/internal/markers/KMappedMarker {
|
||||
public static final field Companion Lkotlin/collections/AbstractSet$Companion;
|
||||
protected fun <init> ()V
|
||||
|
||||
Reference in New Issue
Block a user