Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Unified Diff: sdk/lib/core/map.dart

Issue 16406005: Add addAll to Map interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/collection/splay_tree.dart ('k') | tests/corelib/map_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/map.dart
diff --git a/sdk/lib/core/map.dart b/sdk/lib/core/map.dart
index fe68fd844ee39e60090c0b26091c21f06a58d709..4f67ea1e946d96a083da99a0e82cb89a86cbf672 100644
--- a/sdk/lib/core/map.dart
+++ b/sdk/lib/core/map.dart
@@ -19,7 +19,6 @@ abstract class Map<K, V> {
*/
factory Map.from(Map<K, V> other) => new HashMap<K, V>.from(other);
-
/**
* Returns whether this map contains the given [value].
*/
@@ -54,6 +53,17 @@ abstract class Map<K, V> {
V putIfAbsent(K key, V ifAbsent());
/**
+ * Adds all key-value pairs of [other] to this map.
+ *
+ * If a key of [other] is already in this map, its value is overwritten.
+ *
+ * The operation is equivalent to doing `this[key] = value` for each key
+ * and associated value in other. It iterates over [other], which must
+ * therefore not change during the iteration.
+ */
+ void addAll(Map<K, V> other);
+
+ /**
* Removes the association for the given [key]. Returns the value for
* [key] in the map or null if [key] is not in the map. Note that values
* can be null and a returned null value does not always imply that the
« no previous file with comments | « sdk/lib/collection/splay_tree.dart ('k') | tests/corelib/map_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698