LinkedHashSet

class LinkedHashSet<E> : MutableSet<E>
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.

typealias LinkedHashSet = LinkedHashSet<E>
typealias LinkedHashSet = HashSet<V>

Constructors

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

Constructs a new empty LinkedHashSet.

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

Constructs a new empty LinkedHashSet.

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

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

Functions

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

Returns the hash code value for this set.

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