Chromium Code Reviews| 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..970e48dd95ebe2591e155ffb4ac9414483723100 100644 |
| --- a/sdk/lib/collection/linked_hash_map.dart |
| +++ b/sdk/lib/collection/linked_hash_map.dart |
| @@ -18,8 +18,9 @@ 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), |
|
floitsch
2013/09/05 13:44:28
If we require key1 and key2 to be of type K we mig
Lasse Reichstein Nielsen
2013/09/06 08:49:24
I thought about this and decided that this was the
|
| + int hashCode(K key) }); |
| /** |
| * Creates a [LinkedHashMap] that contains all key value pairs of [other]. |
| @@ -64,35 +65,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); |
| } |