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

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

Issue 22966015: Revert "Make Map constructors return LinkedHashMap." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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/linked_hash_map.dart ('k') | tests/corelib/map_from_iterable_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 79e81e4c5a369de9d8a5dc218af24118c2cbdc88..e5ccb8777fbca825bd982bf8f44c8d024ee70e2c 100644
--- a/sdk/lib/core/map.dart
+++ b/sdk/lib/core/map.dart
@@ -15,12 +15,12 @@ abstract class Map<K, V> {
/**
* Creates a Map instance with the default implementation.
*/
- factory Map() = LinkedHashMap<K, V>;
+ factory Map() => new HashMap<K, V>();
/**
* Creates a Map instance that contains all key-value pairs of [other].
*/
- factory Map.from(Map<K, V> other) = LinkedHashMap<K, V>.from;
+ factory Map.from(Map<K, V> other) => new HashMap<K, V>.from(other);
/**
* Creates a Map instance
@@ -29,7 +29,7 @@ abstract class Map<K, V> {
* For each element of the [iterable] this constructor computes a key-value
* pair, by applying [key] and [value] respectively.
*
- * The keys computed by the source [iterable]
+ * The keys computed by the source [iterable]
* do not need to be unique. The last
* occurrence of a key will simply overwrite any previous value.
*
@@ -37,7 +37,7 @@ abstract class Map<K, V> {
* identity function.
*/
factory Map.fromIterable(Iterable<K> iterable,
- {K key(element), V value(element)}) = LinkedHashMap<K, V>.fromIterable;
+ {K key(element), V value(element)}) = HashMap<K, V>.fromIterable;
/**
* Creates a Map instance associating the given [keys] to [values].
@@ -51,7 +51,7 @@ abstract class Map<K, V> {
* It is an error if the two [Iterable]s don't have the same length.
*/
factory Map.fromIterables(Iterable<K> keys, Iterable<V> values)
- = LinkedHashMap<K, V>.fromIterables;
+ = HashMap<K, V>.fromIterables;
/**
* Returns true if this map contains the given value.
« no previous file with comments | « sdk/lib/collection/linked_hash_map.dart ('k') | tests/corelib/map_from_iterable_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698