AbstractMutableCollection

abstract class AbstractMutableCollection<E> : MutableCollection<E>

Provides a skeletal implementation of the MutableCollection interface.

Since Kotlin

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

Provides a skeletal implementation of the MutableCollection interface.

Since Kotlin

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

Provides a skeletal implementation of the MutableCollection interface.

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
Common
abstract override fun add(element: E): Boolean
abstract override fun add(element: E): Boolean
abstract override fun add(element: E): Boolean
abstract fun add(element: E): Boolean

Adds the specified element to the collection.

addAll
Link copied to clipboard
Common
open override fun addAll(elements: Collection<E>): Boolean
open override fun addAll(elements: Collection<E>): Boolean
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.

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

Removes all elements from this collection.

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

Checks if the specified element is contained in this collection.

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

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

Common
open override fun containsAll(elements: Collection<@UnsafeVariance E>): Boolean
forEach
Link copied to clipboard
open fun forEach(p0: Consumer<in E>)
isEmpty
Link copied to clipboard
open override fun isEmpty(): Boolean
abstract fun isEmpty(): Boolean
abstract fun isEmpty(): Boolean

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

Common
open override fun isEmpty(): Boolean
iterator
Link copied to clipboard
abstract operator override fun iterator(): Iterator<E>
abstract operator override fun iterator(): MutableIterator<E>
abstract operator override fun iterator(): MutableIterator<E>

Returns an iterator over the elements of this object.

Common
abstract operator override fun iterator(): MutableIterator<E>
parallelStream
Link copied to clipboard
open fun parallelStream(): Stream<E>
remove
Link copied to clipboard
Common
open override fun remove(element: E): Boolean
open override fun remove(element: E): Boolean
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.

removeAll
Link copied to clipboard
Common
open override fun removeAll(elements: Collection<E>): Boolean
open override fun removeAll(elements: Collection<E>): Boolean
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.

removeIf
Link copied to clipboard
open fun removeIf(p0: Predicate<in E>): Boolean
retainAll
Link copied to clipboard
Common
open override fun retainAll(elements: Collection<E>): Boolean
open override fun retainAll(elements: Collection<E>): Boolean
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.

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
JS
open fun toJSON(): Any
toString
Link copied to clipboard
JS
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
Native
abstract val size: Int

Returns the size of the collection.

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

Returns the size of the collection.

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

Inheritors

AbstractMutableList
Link copied to clipboard
AbstractMutableSet
Link copied to clipboard