open actual class LinkedHashSet<E> : 

Platform and version requirements: JS

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

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



LinkedHashSet(initialCapacity: Int, loadFactor: Float = 0.0f)

Constructs a new empty LinkedHashSet.

LinkedHashSet(elements: Collection<E>)

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

LinkedHashSet(initialCapacity: Int)

Inherited Properties


open actual val size: Int

Returns the size of the collection.

Inherited Functions


open actual fun add(element: E): Boolean

Adds the specified element to the collection.


fun addAll(elements: Collection<E>): Boolean

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

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

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

fun removeAll(elements: Collection<E>): Boolean

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

fun retainAll(elements: Collection<E>): Boolean

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


open actual fun clear()

Removes all elements from this collection.


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

Checks if the specified element is contained in this collection.


open actual fun isEmpty(): Boolean

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


open actual fun iterator(): MutableIterator<E>

Returns an iterator over the elements of this object.


open actual fun remove(element: E): Boolean

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