Index: pkg/serialization/lib/src/serialization_helpers.dart |
diff --git a/pkg/serialization/lib/src/serialization_helpers.dart b/pkg/serialization/lib/src/serialization_helpers.dart |
index a9954733e610a3594f5a25fc64b5b1d9e6e72d01..9568c24dee7db223fe32fb46df89a1c06c8d0da3 100644 |
--- a/pkg/serialization/lib/src/serialization_helpers.dart |
+++ b/pkg/serialization/lib/src/serialization_helpers.dart |
@@ -77,7 +77,7 @@ abstract class MapLikeIterable { |
* [collection] is a List, it will be the same as the map() method if the |
* [key] parameter wasn't passed. |
*/ |
- mappedBy(Function f) { |
+ map(Function f) { |
var result = copyEmpty(); |
forEach((key, value) { |
result[key] = f(key, value); |
@@ -131,9 +131,9 @@ values(x) { |
} |
mapValues(x, f) { |
- if (x is Set) return x.mappedBy(f).toSet(); |
- if (x is Iterable) return x.mappedBy(f).toList(); |
- if (x is Map) return new ListLikeIterable(x).mappedBy(f); |
+ if (x is Set) return x.map(f).toSet(); |
+ if (x is Iterable) return x.map(f).toList(); |
+ if (x is Map) return new ListLikeIterable(x).map(f); |
throw new ArgumentError("Invalid argument"); |
} |
@@ -158,7 +158,7 @@ class ListLikeIterable { |
* [collection] is a List, it will be the same as if map() had been called |
* directly on [collection]. |
*/ |
- mappedBy(Function f) { |
+ map(Function f) { |
var result = new Map(); |
collection.forEach((key, value) => result[key] = f(value)); |
return result; |
@@ -251,4 +251,4 @@ class IdentityMap<K, V> implements Map<K, V> { |
// Note that this is doing an equality comparison. |
bool containsValue(x) => values.contains(x); |
-} |
+} |