LinkedHashSet

expect class LinkedHashSet<E> : MutableSet<E>
actual typealias LinkedHashSet = LinkedHashSet<E>
actual open class LinkedHashSet<E> : HashSet<E> , MutableSet<E>

The implementation of the MutableSet interface, backed by a LinkedHashMap instance.

This implementation preserves the insertion order of elements during the iteration.

actual typealias LinkedHashSet = HashSet<V>

Constructors

LinkedHashSet
Link copied to clipboard
expect fun LinkedHashSet()
actual fun LinkedHashSet()

Constructs a new empty LinkedHashSet.

LinkedHashSet
Link copied to clipboard
expect fun LinkedHashSet(initialCapacity: Int)
actual fun LinkedHashSet(initialCapacity: Int)
LinkedHashSet
Link copied to clipboard
expect fun LinkedHashSet(initialCapacity: Int, loadFactor: Float = 0.0f)
actual fun LinkedHashSet(initialCapacity: Int, loadFactor: Float = 0.0f)

Constructs a new empty LinkedHashSet.

LinkedHashSet
Link copied to clipboard
expect fun <E> LinkedHashSet(elements: Collection<E>)
actual fun <E> LinkedHashSet(elements: Collection<E>)

Constructs a new LinkedHashSet filled with the elements of the specified collection.

Functions

add
Link copied to clipboard
expect open override fun add(element: E): Boolean
addAll
Link copied to clipboard
expect open override fun addAll(elements: Collection<E>): Boolean
clear
Link copied to clipboard
expect open override fun clear()
contains
Link copied to clipboard
expect open operator override fun contains(element: @UnsafeVariance E): Boolean
containsAll
Link copied to clipboard
expect open override fun containsAll(elements: Collection<@UnsafeVariance E>): Boolean
open override 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.

hashCode
Link copied to clipboard
open override fun hashCode(): Int

Returns the hash code value for this set.

isEmpty
Link copied to clipboard
expect open override fun isEmpty(): Boolean
iterator
Link copied to clipboard
expect open operator override fun iterator(): MutableIterator<E>
remove
Link copied to clipboard
expect open override fun remove(element: E): Boolean
removeAll
Link copied to clipboard
expect open override fun removeAll(elements: Collection<E>): Boolean
retainAll
Link copied to clipboard
expect open override fun retainAll(elements: Collection<E>): Boolean
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
expect open override val size: Int