diff --git a/libraries/stdlib/common/src/kotlin/collections/ArrayList.kt b/libraries/stdlib/common/src/kotlin/collections/ArrayList.kt index d15ccdbe29f..56941893002 100644 --- a/libraries/stdlib/common/src/kotlin/collections/ArrayList.kt +++ b/libraries/stdlib/common/src/kotlin/collections/ArrayList.kt @@ -6,8 +6,31 @@ package kotlin.collections expect class ArrayList : MutableList, RandomAccess { + + /** + * Creates a new empty [ArrayList]. + */ constructor() + + /** + * Creates a new empty [ArrayList] with the specified initial capacity. + * + * Capacity is the maximum number of elements the list is able to store in current backing storage. + * When the list gets full and a new element can't be added, its capacity is expanded, + * which usually leads to creation of a bigger backing storage. + * + * @param initialCapacity the initial capacity of the created list. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative. + */ constructor(initialCapacity: Int) + + /** + * Creates a new [ArrayList] filled with the elements of the specified collection. + * + * The iteration order of elements in the created list is the same as in the specified collection. + */ constructor(elements: Collection) fun trimToSize() diff --git a/libraries/stdlib/common/src/kotlin/collections/HashMap.kt b/libraries/stdlib/common/src/kotlin/collections/HashMap.kt index 3860f684801..bcb861cd4d1 100644 --- a/libraries/stdlib/common/src/kotlin/collections/HashMap.kt +++ b/libraries/stdlib/common/src/kotlin/collections/HashMap.kt @@ -6,9 +6,44 @@ package kotlin.collections expect class HashMap : MutableMap { + /** + * Creates a new empty [HashMap]. + */ constructor() + + /** + * Creates a new empty [HashMap] with the specified initial capacity. + * + * Capacity is the maximum number of entries the map is able to store in current internal data structure. + * When the map gets full by a certain default load factor, its capacity is expanded, + * which usually leads to rebuild of the internal data structure. + * + * @param initialCapacity the initial capacity of the created map. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative. + */ constructor(initialCapacity: Int) + + /** + * Creates a new empty [HashMap] with the specified initial capacity and load factor. + * + * Capacity is the maximum number of entries the map is able to store in current internal data structure. + * Load factor is the measure of how full the map is allowed to get in relation to + * its capacity before the capacity is expanded, which usually leads to rebuild of the internal data structure. + * + * @param initialCapacity the initial capacity of the created map. + * Note that the argument is just a hint for the implementation and can be ignored. + * @param loadFactor the load factor of the created map. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative or [loadFactor] is non-positive. + */ constructor(initialCapacity: Int, loadFactor: Float) + + /** + * Creates a new [HashMap] filled with the contents of the specified [original] map. + */ constructor(original: Map) // From Map diff --git a/libraries/stdlib/common/src/kotlin/collections/HashSet.kt b/libraries/stdlib/common/src/kotlin/collections/HashSet.kt index 762fda82fc6..b9c8d0481b7 100644 --- a/libraries/stdlib/common/src/kotlin/collections/HashSet.kt +++ b/libraries/stdlib/common/src/kotlin/collections/HashSet.kt @@ -6,9 +6,44 @@ package kotlin.collections expect class HashSet : MutableSet { + /** + * Creates a new empty [HashSet]. + */ constructor() + + /** + * Creates a new empty [HashSet] 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. + * + * @param initialCapacity the initial capacity of the created set. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative. + */ constructor(initialCapacity: Int) + + /** + * Creates a new empty [HashSet] 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. + * + * @param initialCapacity the initial capacity of the created set. + * Note that the argument is just a hint for the implementation and can be ignored. + * @param loadFactor the load factor of the created set. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative or [loadFactor] is non-positive. + */ constructor(initialCapacity: Int, loadFactor: Float) + + /** + * Creates a new [HashSet] filled with the elements of the specified collection. + */ constructor(elements: Collection) // From Set diff --git a/libraries/stdlib/common/src/kotlin/collections/LinkedHashMap.kt b/libraries/stdlib/common/src/kotlin/collections/LinkedHashMap.kt index 4982c9c4c92..a6eb0143142 100644 --- a/libraries/stdlib/common/src/kotlin/collections/LinkedHashMap.kt +++ b/libraries/stdlib/common/src/kotlin/collections/LinkedHashMap.kt @@ -6,9 +6,46 @@ package kotlin.collections expect class LinkedHashMap : MutableMap { + /** + * Creates a new empty [LinkedHashMap]. + */ constructor() + + /** + * Creates a new empty [LinkedHashMap] with the specified initial capacity. + * + * Capacity is the maximum number of entries the map is able to store in current internal data structure. + * When the map gets full by a certain default load factor, its capacity is expanded, + * which usually leads to rebuild of the internal data structure. + * + * @param initialCapacity the initial capacity of the created map. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative. + */ constructor(initialCapacity: Int) + + /** + * Creates a new empty [LinkedHashMap] with the specified initial capacity and load factor. + * + * Capacity is the maximum number of entries the map is able to store in current internal data structure. + * Load factor is the measure of how full the map is allowed to get in relation to + * its capacity before the capacity is expanded, which usually leads to rebuild of the internal data structure. + * + * @param initialCapacity the initial capacity of the created map. + * Note that the argument is just a hint for the implementation and can be ignored. + * @param loadFactor the load factor of the created map. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative or [loadFactor] is non-positive. + */ constructor(initialCapacity: Int, loadFactor: Float) + + /** + * Creates a new [LinkedHashMap] filled with the contents of the specified [original] map. + * + * The iteration order of entries in the created map is the same as in the [original] map. + */ constructor(original: Map) // From Map diff --git a/libraries/stdlib/common/src/kotlin/collections/LinkedHashSet.kt b/libraries/stdlib/common/src/kotlin/collections/LinkedHashSet.kt index e242c6cbd6e..82f6c1265d3 100644 --- a/libraries/stdlib/common/src/kotlin/collections/LinkedHashSet.kt +++ b/libraries/stdlib/common/src/kotlin/collections/LinkedHashSet.kt @@ -6,9 +6,46 @@ package kotlin.collections expect class LinkedHashSet : MutableSet { + /** + * Creates a new empty [LinkedHashSet]. + */ constructor() + + /** + * 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. + * + * @param initialCapacity the initial capacity of the created set. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative. + */ constructor(initialCapacity: Int) + + /** + * 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. + * + * @param initialCapacity the initial capacity of the created set. + * Note that the argument is just a hint for the implementation and can be ignored. + * @param loadFactor the load factor of the created set. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative or [loadFactor] is non-positive. + */ constructor(initialCapacity: Int, loadFactor: Float) + + /** + * 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. + */ constructor(elements: Collection) // From Set diff --git a/libraries/stdlib/js/src/kotlin/collections/ArrayList.kt b/libraries/stdlib/js/src/kotlin/collections/ArrayList.kt index 273f7e3b424..44403520ed5 100644 --- a/libraries/stdlib/js/src/kotlin/collections/ArrayList.kt +++ b/libraries/stdlib/js/src/kotlin/collections/ArrayList.kt @@ -20,18 +20,28 @@ public actual open class ArrayList internal constructor(private var array: Ar private var isReadOnly: Boolean = false /** - * Creates an empty [ArrayList]. + * Creates a new empty [ArrayList]. */ public actual constructor() : this(emptyArray()) {} /** - * Creates an empty [ArrayList]. - * @param initialCapacity initial capacity (ignored) + * Creates a new empty [ArrayList] with the specified initial capacity. + * + * Capacity is the maximum number of elements the list is able to store in current backing storage. + * When the list gets full and a new element can't be added, its capacity is expanded, + * which usually leads to creation of a bigger backing storage. + * + * @param initialCapacity the initial capacity of the created list. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative. */ public actual constructor(initialCapacity: Int) : this(emptyArray()) {} /** - * Creates an [ArrayList] filled from the [elements] collection. + * Creates a new [ArrayList] filled with the elements of the specified collection. + * + * The iteration order of elements in the created list is the same as in the specified collection. */ public actual constructor(elements: Collection) : this(elements.toTypedArray()) {} diff --git a/libraries/stdlib/js/src/kotlin/collections/HashMap.kt b/libraries/stdlib/js/src/kotlin/collections/HashMap.kt index f9733b200c6..d158eb5e401 100644 --- a/libraries/stdlib/js/src/kotlin/collections/HashMap.kt +++ b/libraries/stdlib/js/src/kotlin/collections/HashMap.kt @@ -57,29 +57,47 @@ public actual open class HashMap : AbstractMutableMap, MutableMap= 0) { "Negative initial capacity: $initialCapacity" } - require(loadFactor >= 0) { "Non-positive load factor: $loadFactor" } + require(loadFactor > 0) { "Non-positive load factor: $loadFactor" } } + /** + * Creates a new empty [HashMap] with the specified initial capacity. + * + * Capacity is the maximum number of entries the map is able to store in current internal data structure. + * When the map gets full by a certain default load factor, its capacity is expanded, + * which usually leads to rebuild of the internal data structure. + * + * @param initialCapacity the initial capacity of the created map. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative. + */ actual constructor(initialCapacity: Int) : this(initialCapacity, 0.0f) /** - * Constructs an instance of [HashMap] filled with the contents of the specified [original] map. + * Creates a new [HashMap] filled with the contents of the specified [original] map. */ actual constructor(original: Map) : this() { this.putAll(original) diff --git a/libraries/stdlib/js/src/kotlin/collections/HashSet.kt b/libraries/stdlib/js/src/kotlin/collections/HashSet.kt index 90ab241d6ed..471d71fd9ad 100644 --- a/libraries/stdlib/js/src/kotlin/collections/HashSet.kt +++ b/libraries/stdlib/js/src/kotlin/collections/HashSet.kt @@ -19,14 +19,14 @@ public actual open class HashSet : AbstractMutableSet, MutableSet { internal val map: HashMap /** - * Constructs a new empty [HashSet]. + * Creates a new empty [HashSet]. */ actual constructor() { map = HashMap() } /** - * Constructs a new [HashSet] filled with the elements of the specified collection. + * Creates a new [HashSet] filled with the elements of the specified collection. */ actual constructor(elements: Collection) { map = HashMap(elements.size) @@ -34,17 +34,35 @@ public actual open class HashSet : AbstractMutableSet, MutableSet { } /** - * Constructs a new empty [HashSet]. + * Creates a new empty [HashSet] with the specified initial capacity and load factor. * - * @param initialCapacity the initial capacity (ignored) - * @param loadFactor the load factor (ignored) + * 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. * - * @throws IllegalArgumentException if the initial capacity or load factor are negative + * @param initialCapacity the initial capacity of the created set. + * Note that the argument is just a hint for the implementation and can be ignored. + * @param loadFactor the load factor of the created set. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative or [loadFactor] is non-positive. */ actual constructor(initialCapacity: Int, loadFactor: Float) { map = HashMap(initialCapacity, loadFactor) } + /** + * Creates a new empty [HashSet] 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. + * + * @param initialCapacity the initial capacity of the created set. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative. + */ actual constructor(initialCapacity: Int) : this(initialCapacity, 0.0f) /** diff --git a/libraries/stdlib/js/src/kotlin/collections/LinkedHashMap.kt b/libraries/stdlib/js/src/kotlin/collections/LinkedHashMap.kt index 84cafc3e1fa..f7e4751e3c3 100644 --- a/libraries/stdlib/js/src/kotlin/collections/LinkedHashMap.kt +++ b/libraries/stdlib/js/src/kotlin/collections/LinkedHashMap.kt @@ -170,7 +170,7 @@ public actual open class LinkedHashMap : HashMap, MutableMap { private var isReadOnly: Boolean = false /** - * Constructs an empty [LinkedHashMap] instance. + * Creates a new empty [LinkedHashMap]. */ actual constructor() : super() { map = HashMap>() @@ -182,21 +182,41 @@ public actual open class LinkedHashMap : HashMap, MutableMap { } /** - * Constructs an empty [LinkedHashMap] instance. + * Creates a new empty [LinkedHashMap] with the specified initial capacity and load factor. * - * @param initialCapacity the initial capacity (ignored) - * @param loadFactor the load factor (ignored) + * Capacity is the maximum number of entries the map is able to store in current internal data structure. + * Load factor is the measure of how full the map is allowed to get in relation to + * its capacity before the capacity is expanded, which usually leads to rebuild of the internal data structure. * - * @throws IllegalArgumentException if the initial capacity or load factor are negative + * @param initialCapacity the initial capacity of the created map. + * Note that the argument is just a hint for the implementation and can be ignored. + * @param loadFactor the load factor of the created map. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative or [loadFactor] is non-positive. */ actual constructor(initialCapacity: Int, loadFactor: Float) : super(initialCapacity, loadFactor) { map = HashMap>() } + /** + * Creates a new empty [LinkedHashMap] with the specified initial capacity. + * + * Capacity is the maximum number of entries the map is able to store in current internal data structure. + * When the map gets full by a certain default load factor, its capacity is expanded, + * which usually leads to rebuild of the internal data structure. + * + * @param initialCapacity the initial capacity of the created map. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative. + */ actual constructor(initialCapacity: Int) : this(initialCapacity, 0.0f) /** - * Constructs an instance of [LinkedHashMap] filled with the contents of the specified [original] map. + * Creates a new [LinkedHashMap] filled with the contents of the specified [original] map. + * + * The iteration order of entries in the created map is the same as in the [original] map. */ actual constructor(original: Map) { map = HashMap>() diff --git a/libraries/stdlib/js/src/kotlin/collections/LinkedHashSet.kt b/libraries/stdlib/js/src/kotlin/collections/LinkedHashSet.kt index 8561ecbcbf8..7791c73910c 100644 --- a/libraries/stdlib/js/src/kotlin/collections/LinkedHashSet.kt +++ b/libraries/stdlib/js/src/kotlin/collections/LinkedHashSet.kt @@ -24,27 +24,47 @@ public actual open class LinkedHashSet : HashSet, MutableSet { internal constructor(map: LinkedHashMap) : super(map) /** - * Constructs a new empty [LinkedHashSet]. + * Creates a new empty [LinkedHashSet]. */ actual constructor() : super(LinkedHashMap()) /** - * Constructs a new [LinkedHashSet] filled with the elements of the specified collection. + * 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(elements: Collection) : super(LinkedHashMap()) { addAll(elements) } /** - * Constructs a new empty [LinkedHashSet]. + * Creates a new empty [LinkedHashSet] with the specified initial capacity and load factor. * - * @param initialCapacity the initial capacity (ignored) - * @param loadFactor the load factor (ignored) + * 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. * - * @throws IllegalArgumentException if the initial capacity or load factor are negative + * @param initialCapacity the initial capacity of the created set. + * Note that the argument is just a hint for the implementation and can be ignored. + * @param loadFactor the load factor of the created set. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative or [loadFactor] is non-positive. */ actual constructor(initialCapacity: Int, loadFactor: Float) : super(LinkedHashMap(initialCapacity, loadFactor)) + /** + * 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. + * + * @param initialCapacity the initial capacity of the created set. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative. + */ actual constructor(initialCapacity: Int) : this(initialCapacity, 0.0f) @PublishedApi diff --git a/libraries/stdlib/native-wasm/src/kotlin/collections/ArrayList.kt b/libraries/stdlib/native-wasm/src/kotlin/collections/ArrayList.kt index 1baf4d6b78c..486a34386a1 100644 --- a/libraries/stdlib/native-wasm/src/kotlin/collections/ArrayList.kt +++ b/libraries/stdlib/native-wasm/src/kotlin/collections/ArrayList.kt @@ -17,11 +17,31 @@ actual class ArrayList private constructor( private val Empty = ArrayList(0).also { it.isReadOnly = true } } + /** + * Creates a new empty [ArrayList]. + */ actual constructor() : this(10) + /** + * Creates a new empty [ArrayList] with the specified initial capacity. + * + * Capacity is the maximum number of elements the list is able to store in current backing storage. + * When the list gets full and a new element can't be added, its capacity is expanded, + * which usually leads to creation of a bigger backing storage. + * + * @param initialCapacity the initial capacity of the created list. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative. + */ actual constructor(initialCapacity: Int) : this( arrayOfUninitializedElements(initialCapacity), 0, 0, false, null, null) + /** + * Creates a new [ArrayList] filled with the elements of the specified collection. + * + * The iteration order of elements in the created list is the same as in the specified collection. + */ actual constructor(elements: Collection) : this(elements.size) { addAll(elements) } diff --git a/libraries/stdlib/native-wasm/src/kotlin/collections/HashMap.kt b/libraries/stdlib/native-wasm/src/kotlin/collections/HashMap.kt index 040f85919bd..a006415a388 100644 --- a/libraries/stdlib/native-wasm/src/kotlin/collections/HashMap.kt +++ b/libraries/stdlib/native-wasm/src/kotlin/collections/HashMap.kt @@ -31,8 +31,23 @@ actual class HashMap private constructor( // ---------------------------- functions ---------------------------- + /** + * Creates a new empty [HashMap]. + */ actual constructor() : this(INITIAL_CAPACITY) + /** + * Creates a new empty [HashMap] with the specified initial capacity. + * + * Capacity is the maximum number of entries the map is able to store in current internal data structure. + * When the map gets full by a certain default load factor, its capacity is expanded, + * which usually leads to rebuild of the internal data structure. + * + * @param initialCapacity the initial capacity of the created map. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative. + */ actual constructor(initialCapacity: Int) : this( arrayOfUninitializedElements(initialCapacity), null, @@ -41,11 +56,27 @@ actual class HashMap private constructor( INITIAL_MAX_PROBE_DISTANCE, 0) + /** + * Creates a new [HashMap] filled with the contents of the specified [original] map. + */ actual constructor(original: Map) : this(original.size) { putAll(original) } - // This implementation doesn't use a loadFactor, this constructor is used for compatibility with common stdlib + /** + * Creates a new empty [HashMap] with the specified initial capacity and load factor. + * + * Capacity is the maximum number of entries the map is able to store in current internal data structure. + * Load factor is the measure of how full the map is allowed to get in relation to + * its capacity before the capacity is expanded, which usually leads to rebuild of the internal data structure. + * + * @param initialCapacity the initial capacity of the created map. + * Note that the argument is just a hint for the implementation and can be ignored. + * @param loadFactor the load factor of the created map. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative or [loadFactor] is non-positive. + */ actual constructor(initialCapacity: Int, loadFactor: Float) : this(initialCapacity) @PublishedApi diff --git a/libraries/stdlib/native-wasm/src/kotlin/collections/HashSet.kt b/libraries/stdlib/native-wasm/src/kotlin/collections/HashSet.kt index 003873427b2..d62429eaa10 100644 --- a/libraries/stdlib/native-wasm/src/kotlin/collections/HashSet.kt +++ b/libraries/stdlib/native-wasm/src/kotlin/collections/HashSet.kt @@ -12,15 +12,46 @@ actual class HashSet internal constructor( private val Empty = HashSet(HashMap.EmptyHolder.value()) } + /** + * Creates a new empty [HashSet]. + */ actual constructor() : this(HashMap()) + /** + * Creates a new empty [HashSet] 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. + * + * @param initialCapacity the initial capacity of the created set. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative. + */ actual constructor(initialCapacity: Int) : this(HashMap(initialCapacity)) + /** + * Creates a new [HashSet] filled with the elements of the specified collection. + */ actual constructor(elements: Collection) : this(elements.size) { addAll(elements) } - // This implementation doesn't use a loadFactor + /** + * Creates a new empty [HashSet] 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. + * + * @param initialCapacity the initial capacity of the created set. + * Note that the argument is just a hint for the implementation and can be ignored. + * @param loadFactor the load factor of the created set. + * Note that the argument is just a hint for the implementation and can be ignored. + * + * @throws IllegalArgumentException if [initialCapacity] is negative or [loadFactor] is non-positive. + */ actual constructor(initialCapacity: Int, loadFactor: Float) : this(initialCapacity) @PublishedApi