Chromium Code Reviews| Index: sdk/lib/collection/hash_map.dart |
| diff --git a/sdk/lib/collection/hash_map.dart b/sdk/lib/collection/hash_map.dart |
| index d90b4b9f0646c5ebbb689695696bf87f07a94d51..676c89268e91e0a102f397c718a658ef6d2e1eef 100644 |
| --- a/sdk/lib/collection/hash_map.dart |
| +++ b/sdk/lib/collection/hash_map.dart |
| @@ -21,16 +21,18 @@ class _HashMapTable<K, V> extends _HashTable<K> { |
| } |
| class HashMap<K, V> implements Map<K, V> { |
| - final _HashMapTable<K, V> _hashTable; |
| + final _HashMapTable<K, V> _hashTable = new _HashMapTable<K, V>(); |
| - HashMap() : _hashTable = new _HashMapTable<K, V>() { |
| - _hashTable._container = this; |
| - } |
| + external factory HashMap(); |
|
Ivan Posva
2013/03/22 16:32:47
Why stop here? There are plenty of other opportuni
kasperl
2013/03/22 16:36:01
I need to have this _internal hashTable object eve
|
| factory HashMap.from(Map<K, V> other) { |
| return new HashMap<K, V>()..addAll(other); |
| } |
| + HashMap._internal() { |
| + _hashTable._container = this; |
| + } |
| + |
| bool containsKey(K key) { |
| return _hashTable._get(key) >= 0; |
| } |