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

Unified Diff: sdk/lib/collection/linked_hash_map.dart

Issue 23872008: Reapply "Make LinkedHashMap also have a factory constructor and be customizable"" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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/hash_map.dart ('k') | sdk/lib/collection/splay_tree.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/collection/linked_hash_map.dart
diff --git a/sdk/lib/collection/linked_hash_map.dart b/sdk/lib/collection/linked_hash_map.dart
index ff6f045fa10404f0234fa17437bee3a69d5b2afe..34744d023591963b2b982bdac1db269c07735a9f 100644
--- a/sdk/lib/collection/linked_hash_map.dart
+++ b/sdk/lib/collection/linked_hash_map.dart
@@ -18,8 +18,10 @@ part of dart.collection;
*
* The map allows `null` as a key.
*/
-class LinkedHashMap<K, V> implements HashMap<K, V> {
- external LinkedHashMap();
+abstract class LinkedHashMap<K, V> implements HashMap<K, V> {
+ external factory LinkedHashMap({ bool equals(K key1, K key2),
+ int hashCode(K key),
+ bool isValidKey(potentialKey) });
/**
* Creates a [LinkedHashMap] that contains all key value pairs of [other].
@@ -64,35 +66,4 @@ class LinkedHashMap<K, V> implements HashMap<K, V> {
Maps._fillMapWithIterables(map, keys, values);
return map;
}
-
- external bool containsKey(Object key);
-
- external bool containsValue(Object value);
-
- external void addAll(Map<K, V> other);
-
- external V operator [](Object key);
-
- external void operator []=(K key, V value);
-
- external V putIfAbsent(K key, V ifAbsent());
-
- external V remove(Object key);
-
- external void clear();
-
- external void forEach(void action (K key, V value));
-
- /** The keys of the map, in insertion order. */
- external Iterable<K> get keys;
- /** The values of the map, in the order of their corresponding [keys].*/
- external Iterable<V> get values;
-
- external int get length;
-
- external bool get isEmpty;
-
- external bool get isNotEmpty;
-
- String toString() => Maps.mapToString(this);
}
« no previous file with comments | « sdk/lib/collection/hash_map.dart ('k') | sdk/lib/collection/splay_tree.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698