AbstractMutableCollection

expect abstract class AbstractMutableCollection<E> : MutableCollection<E>

Provides a skeletal implementation of the MutableCollection interface.

Since Kotlin

1.3
actual abstract class AbstractMutableCollection<E> : AbstractCollection<E> , MutableCollection<E>

Provides a skeletal implementation of the MutableCollection interface.

Since Kotlin

1.1
actual abstract class AbstractMutableCollection<E> : AbstractCollection<E> , MutableCollection<E>

Provides a skeletal implementation of the MutableCollection interface.

actual abstract class AbstractMutableCollection<E> : AbstractCollection<E> , MutableCollection<E>

Provides a skeletal implementation of the MutableCollection interface.

Parameters

E

the type of elements contained in the collection. The collection is invariant in its element type.

E

the type of elements contained in the collection. The collection is invariant in its element type.

E

the type of elements contained in the collection. The collection is invariant in its element type.

E

the type of elements contained in the collection. The collection is invariant in its element type.

Functions

add
Link copied to clipboard
expect abstract override fun add(element: E): Boolean
actual abstract override fun add(element: E): Boolean

Adds the specified element to the collection.

actual abstract override fun add(element: E): Boolean

Adds the specified element to the collection.

abstract fun add(element: E): Boolean

Adds the specified element to the collection.

addAll
Link copied to clipboard
expect open override fun addAll(elements: Collection<E>): Boolean
abstract fun addAll(elements: Collection<E>): Boolean

Adds all of the elements of the specified collection to this collection.

actual open override fun addAll(elements: Collection<E>): Boolean

Adds all of the elements of the specified collection to this collection.

actual open override fun addAll(elements: Collection<E>): Boolean

Adds all of the elements of the specified collection to this collection.

clear
Link copied to clipboard
expect open override fun clear()
abstract fun clear()

Removes all elements from this collection.

actual open override fun clear()

Removes all elements from this collection.

actual open override fun clear()

Removes all elements from this collection.

contains
Link copied to clipboard
expect open operator override fun contains(element: @UnsafeVariance E): Boolean
abstract operator fun contains(element: E): Boolean

Checks if the specified element is contained in this collection.

open operator override fun contains(element: E): Boolean

Checks if the specified element is contained in this collection.

abstract operator fun contains(element: E): Boolean

Checks if the specified element is contained in this collection.

containsAll
Link copied to clipboard
expect open override fun containsAll(elements: Collection<@UnsafeVariance E>): Boolean
abstract fun containsAll(elements: Collection<E>): Boolean

Checks if all elements in the specified collection are contained in this collection.

open override fun containsAll(elements: Collection<E>): Boolean

Checks if all elements in the specified collection are contained in this collection.

abstract fun containsAll(elements: Collection<E>): Boolean

Checks if all elements in the specified collection are contained in this collection.

forEach
Link copied to clipboard
open fun forEach(p0: Consumer<in E>)
isEmpty
Link copied to clipboard
expect open override fun isEmpty(): Boolean
abstract fun isEmpty(): Boolean

Returns true if the collection is empty (contains no elements), false otherwise.

open override fun isEmpty(): Boolean

Returns true if the collection is empty (contains no elements), false otherwise.

abstract fun isEmpty(): Boolean

Returns true if the collection is empty (contains no elements), false otherwise.

iterator
Link copied to clipboard
expect abstract operator override fun iterator(): MutableIterator<E>
abstract operator override fun iterator(): MutableIterator<E>

Returns an iterator over the elements of this object.

abstract operator override fun iterator(): Iterator<E>

Returns an iterator over the elements of this object.

abstract operator override fun iterator(): MutableIterator<E>

Returns an iterator over the elements of this object.

parallelStream
Link copied to clipboard
open fun parallelStream(): Stream<E>
remove
Link copied to clipboard
expect open override fun remove(element: E): Boolean
abstract fun remove(element: E): Boolean

Removes a single instance of the specified element from this collection, if it is present.

actual open override fun remove(element: E): Boolean

Removes a single instance of the specified element from this collection, if it is present.

actual open override fun remove(element: E): Boolean

Removes a single instance of the specified element from this collection, if it is present.

removeAll
Link copied to clipboard
expect open override fun removeAll(elements: Collection<E>): Boolean
abstract fun removeAll(elements: Collection<E>): Boolean

Removes all of this collection's elements that are also contained in the specified collection.

actual open override fun removeAll(elements: Collection<E>): Boolean

Removes all of this collection's elements that are also contained in the specified collection.

actual open override fun removeAll(elements: Collection<E>): Boolean

Removes all of this collection's elements that are also contained in the specified collection.

removeIf
Link copied to clipboard
open fun removeIf(p0: Predicate<in E>): Boolean
retainAll
Link copied to clipboard
expect open override fun retainAll(elements: Collection<E>): Boolean
abstract fun retainAll(elements: Collection<E>): Boolean

Retains only the elements in this collection that are contained in the specified collection.

actual open override fun retainAll(elements: Collection<E>): Boolean

Retains only the elements in this collection that are contained in the specified collection.

actual open override fun retainAll(elements: Collection<E>): Boolean

Retains only the elements in this collection that are contained in the specified collection.

spliterator
Link copied to clipboard
open override fun spliterator(): Spliterator<E>
stream
Link copied to clipboard
open fun stream(): Stream<E>
toArray
Link copied to clipboard
open fun toArray(): Array<Any>
open fun <T : Any> toArray(p0: Array<T>): Array<T>
open fun <T : Any> toArray(p0: IntFunction<Array<T>>): Array<T>
toJSON
Link copied to clipboard
open fun toJSON(): Any
toString
Link copied to clipboard
open override fun toString(): String

Properties

size
Link copied to clipboard
abstract val size: Int

Returns the size of the collection.

size
Link copied to clipboard
abstract val size: Int

Returns the size of the collection.

size
Link copied to clipboard
abstract override val size: Int

Returns the size of the collection.

size
Link copied to clipboard
expect abstract override val size: Int

Inheritors

AbstractMutableList
Link copied to clipboard
AbstractMutableSet
Link copied to clipboard