stdlib: Uncomment linkedMapOf and linkedSetOf methods
This commit is contained in:
@@ -96,8 +96,8 @@ public fun <K, V> hashMapOf(vararg pairs: Pair<K, V>): HashMap<K, V>
|
||||
*
|
||||
* @sample samples.collections.Maps.Instantiation.linkedMapFromPairs
|
||||
*/
|
||||
//public fun <K, V> linkedMapOf(vararg pairs: Pair<K, V>): LinkedHashMap<K, V>
|
||||
// = LinkedHashMap<K, V>(mapCapacity(pairs.size)).apply { putAll(pairs) }
|
||||
public fun <K, V> linkedMapOf(vararg pairs: Pair<K, V>): LinkedHashMap<K, V>
|
||||
= LinkedHashMap<K, V>(mapCapacity(pairs.size)).apply { putAll(pairs) }
|
||||
|
||||
/**
|
||||
* Calculate the initial capacity of a map, based on Guava's com.google.common.collect.Maps approach. This is equivalent
|
||||
|
||||
@@ -58,7 +58,7 @@ public fun <T> hashSetOf(vararg elements: T): HashSet<T> = elements.toCollection
|
||||
* Returns a new [LinkedHashSet] with the given elements.
|
||||
* Elements of the set are iterated in the order they were specified.
|
||||
*/
|
||||
//public fun <T> linkedSetOf(vararg elements: T): LinkedHashSet<T> = elements.toCollection(LinkedHashSet(mapCapacity(elements.size)))
|
||||
public fun <T> linkedSetOf(vararg elements: T): LinkedHashSet<T> = elements.toCollection(LinkedHashSet(mapCapacity(elements.size)))
|
||||
|
||||
/** Returns this Set if it's not `null` and the empty set otherwise. */
|
||||
@kotlin.internal.InlineOnly
|
||||
|
||||
Reference in New Issue
Block a user