stdlib: Uncomment linkedMapOf and linkedSetOf methods

This commit is contained in:
Ilya Matveev
2017-04-17 15:45:59 +07:00
committed by ilmat192
parent 325210ae52
commit 16f3dcde8a
2 changed files with 3 additions and 3 deletions
@@ -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