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>
|
||||
Reference in New Issue
Block a user