From dcd6e86cd3dec632082c20c4fe16716bdc6747ea Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Tue, 9 Aug 2016 23:19:13 +0300 Subject: [PATCH] Minor: rename type parameter from C to M as it stands for Map --- libraries/stdlib/src/kotlin/collections/Maps.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/stdlib/src/kotlin/collections/Maps.kt b/libraries/stdlib/src/kotlin/collections/Maps.kt index 76e67ceffe5..5fc02a8bfcd 100644 --- a/libraries/stdlib/src/kotlin/collections/Maps.kt +++ b/libraries/stdlib/src/kotlin/collections/Maps.kt @@ -238,7 +238,7 @@ public inline operator fun MutableMap.iterator(): MutableIterator> Map.mapValuesTo(destination: C, transform: (Map.Entry) -> R): C { +public inline fun > Map.mapValuesTo(destination: M, transform: (Map.Entry) -> R): M { return entries.associateByTo(destination, { it.key }, transform) } @@ -249,7 +249,7 @@ public inline fun > Map.mapValuesT * In case if any two entries are mapped to the equal keys, the value of the latter one will overwrite * the value associated with the former one. */ -public inline fun > Map.mapKeysTo(destination: C, transform: (Map.Entry) -> R): C { +public inline fun > Map.mapKeysTo(destination: M, transform: (Map.Entry) -> R): M { return entries.associateByTo(destination, transform, { it.value }) } @@ -345,7 +345,7 @@ public inline fun Map.filterValues(predicate: (V) -> Boolean): * * @return the destination map. */ -public inline fun > Map.filterTo(destination: C, predicate: (Map.Entry) -> Boolean): C { +public inline fun > Map.filterTo(destination: M, predicate: (Map.Entry) -> Boolean): M { for (element in this) { if (predicate(element)) { destination.put(element.key, element.value) @@ -368,7 +368,7 @@ public inline fun Map.filter(predicate: (Map.Entry) -> Bo * * @return the destination map. */ -public inline fun > Map.filterNotTo(destination: C, predicate: (Map.Entry) -> Boolean): C { +public inline fun > Map.filterNotTo(destination: M, predicate: (Map.Entry) -> Boolean): M { for (element in this) { if (!predicate(element)) { destination.put(element.key, element.value)