LinkedHashSet

expect constructor()(source)

Creates a new empty LinkedHashSet.


expect constructor(initialCapacity: Int)(source)

Creates a new empty LinkedHashSet with the specified initial capacity.

Capacity is the maximum number of elements the set is able to store in current internal data structure. When the set gets full by a certain default load factor, its capacity is expanded, which usually leads to rebuild of the internal data structure.

Parameters

initialCapacity

the initial capacity of the created set. Note that the argument is just a hint for the implementation and can be ignored.

Throws


expect constructor(initialCapacity: Int, loadFactor: Float)(source)

Creates a new empty LinkedHashSet with the specified initial capacity and load factor.

Capacity is the maximum number of elements the set is able to store in current internal data structure. Load factor is the measure of how full the set is allowed to get in relation to its capacity before the capacity is expanded, which usually leads to rebuild of the internal data structure.

Parameters

initialCapacity

the initial capacity of the created set. Note that the argument is just a hint for the implementation and can be ignored.

loadFactor

the load factor of the created set. Note that the argument is just a hint for the implementation and can be ignored.

Throws

if initialCapacity is negative or loadFactor is non-positive.


expect constructor(elements: Collection<E>)(source)

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

The iteration order of elements in the created set is the same as in the specified collection.

actual constructor()(source)

Creates a new empty LinkedHashSet.


actual constructor(initialCapacity: Int)(source)

Creates a new empty LinkedHashSet with the specified initial capacity.

Capacity is the maximum number of elements the set is able to store in current internal data structure. When the set gets full by a certain default load factor, its capacity is expanded, which usually leads to rebuild of the internal data structure.

Parameters

initialCapacity

the initial capacity of the created set. Note that the argument is just a hint for the implementation and can be ignored.

Throws


actual constructor(initialCapacity: Int, loadFactor: Float)(source)

Creates a new empty LinkedHashSet with the specified initial capacity and load factor.

Capacity is the maximum number of elements the set is able to store in current internal data structure. Load factor is the measure of how full the set is allowed to get in relation to its capacity before the capacity is expanded, which usually leads to rebuild of the internal data structure.

Parameters

initialCapacity

the initial capacity of the created set. Note that the argument is just a hint for the implementation and can be ignored.

loadFactor

the load factor of the created set. Note that the argument is just a hint for the implementation and can be ignored.

Throws

if initialCapacity is negative or loadFactor is non-positive.


actual constructor(elements: Collection<E>)(source)

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

The iteration order of elements in the created set is the same as in the specified collection.