AbstractMutableSet

expect abstract class AbstractMutableSet<E> : MutableSet<E>

Provides a skeletal implementation of the MutableSet interface.

Since Kotlin

1.3
actual abstract class AbstractMutableSet<E> : AbstractSet<E> , MutableSet<E>

Provides a skeletal implementation of the MutableSet interface.

Since Kotlin

1.1
actual abstract class AbstractMutableSet<E> : AbstractMutableCollection<E> , MutableSet<E>

Provides a skeletal implementation of the MutableSet interface.

actual abstract class AbstractMutableSet<E> : AbstractMutableCollection<E> , MutableSet<E>

Provides a skeletal implementation of the MutableSet interface.

Since Kotlin

1.1

Parameters

E

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

E

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

E

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

E

the type of elements contained in the set. The set 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 set.

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

Adds the specified element to the set.

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

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Compares this set with another set instance with the unordered structural equality.

open operator override fun equals(other: Any?): Boolean

Compares this set with another set instance with the unordered structural equality.

forEach
Link copied to clipboard
open fun forEach(p0: Consumer<in E>)
hashCode
Link copied to clipboard
open override fun hashCode(): Int

Returns the hash code value for this set.

open override fun hashCode(): Int

Returns the hash code value for this set.

isEmpty
Link copied to clipboard
expect open override fun isEmpty(): Boolean
abstract override 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 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 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 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 override 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
abstract val size: Int

Returns the size of the collection.

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

Inheritors

HashSet
Link copied to clipboard