From 16f3dcde8a58345b100e97f555f417cb19cc5a9f Mon Sep 17 00:00:00 2001 From: Ilya Matveev Date: Mon, 17 Apr 2017 15:45:59 +0700 Subject: [PATCH] stdlib: Uncomment linkedMapOf and linkedSetOf methods --- runtime/src/main/kotlin/kotlin/collections/Maps.kt | 4 ++-- runtime/src/main/kotlin/kotlin/collections/Sets.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/src/main/kotlin/kotlin/collections/Maps.kt b/runtime/src/main/kotlin/kotlin/collections/Maps.kt index 1a0a8dd498c..6ac1016d914 100644 --- a/runtime/src/main/kotlin/kotlin/collections/Maps.kt +++ b/runtime/src/main/kotlin/kotlin/collections/Maps.kt @@ -96,8 +96,8 @@ public fun hashMapOf(vararg pairs: Pair): HashMap * * @sample samples.collections.Maps.Instantiation.linkedMapFromPairs */ -//public fun linkedMapOf(vararg pairs: Pair): LinkedHashMap -// = LinkedHashMap(mapCapacity(pairs.size)).apply { putAll(pairs) } +public fun linkedMapOf(vararg pairs: Pair): LinkedHashMap + = LinkedHashMap(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 diff --git a/runtime/src/main/kotlin/kotlin/collections/Sets.kt b/runtime/src/main/kotlin/kotlin/collections/Sets.kt index d77bbdc871c..1153802e88e 100644 --- a/runtime/src/main/kotlin/kotlin/collections/Sets.kt +++ b/runtime/src/main/kotlin/kotlin/collections/Sets.kt @@ -58,7 +58,7 @@ public fun hashSetOf(vararg elements: T): HashSet = elements.toCollection * Returns a new [LinkedHashSet] with the given elements. * Elements of the set are iterated in the order they were specified. */ -//public fun linkedSetOf(vararg elements: T): LinkedHashSet = elements.toCollection(LinkedHashSet(mapCapacity(elements.size))) +public fun linkedSetOf(vararg elements: T): LinkedHashSet = elements.toCollection(LinkedHashSet(mapCapacity(elements.size))) /** Returns this Set if it's not `null` and the empty set otherwise. */ @kotlin.internal.InlineOnly