| OLD | NEW |
| 1 part of dart.collection; | 1 part of dart.collection; |
| 2 bool _defaultEquals(Object a, Object b) => a == b; | 2 bool _defaultEquals(Object a, Object b) => a == b; |
| 3 int _defaultHashCode(Object a) => a.hashCode; | 3 int _defaultHashCode(Object a) => a.hashCode; |
| 4 typedef bool _Equality<K>(K a, K b); | 4 typedef bool _Equality<K>(K a, K b); |
| 5 typedef int _Hasher<K>(K object); | 5 typedef int _Hasher<K>(K object); |
| 6 abstract class HashMap<K, V> implements Map<K, V> {external factory HashMap({ | 6 abstract class HashMap<K, V> implements Map<K, V> {external factory HashMap({ |
| 7 bool equals(K key1, K key2), int hashCode(K key), bool isValidKey(potentialKey
)} | 7 bool equals(K key1, K key2), int hashCode(K key), bool isValidKey(potentialKey
)} |
| 8 ); | 8 ); |
| 9 external factory HashMap.identity(); | 9 external factory HashMap.identity(); |
| 10 factory HashMap.from(Map other) { | 10 factory HashMap.from(Map other) { |
| 11 HashMap<K, V> result = new HashMap<K, V>(); | 11 HashMap<K, V> result = new HashMap<K, V>(); |
| 12 other.forEach((k, v) { | 12 other.forEach((k, v) { |
| 13 result[k] = DEVC$RT.cast(v, dynamic, V, "CompositeCast", """line 87, column
40 of dart:collection/hash_map.dart: """, v is V, false); | 13 result[DEVC$RT.cast(k, dynamic, K, "CompositeCast", """line 87, column 35 of
dart:collection/hash_map.dart: """, k is K, false)] = DEVC$RT.cast(v, dynamic,
V, "CompositeCast", """line 87, column 40 of dart:collection/hash_map.dart: """,
v is V, false); |
| 14 } | 14 } |
| 15 ); | 15 ); |
| 16 return result; | 16 return result; |
| 17 } | 17 } |
| 18 factory HashMap.fromIterable(Iterable iterable, { | 18 factory HashMap.fromIterable(Iterable iterable, { |
| 19 K key(element), V value(element)} | 19 K key(element), V value(element)} |
| 20 ) { | 20 ) { |
| 21 HashMap<K, V> map = new HashMap<K, V>(); | 21 HashMap<K, V> map = new HashMap<K, V>(); |
| 22 Maps._fillMapWithMappedIterable(map, iterable, key, value); | 22 Maps._fillMapWithMappedIterable(map, iterable, key, value); |
| 23 return map; | 23 return map; |
| 24 } | 24 } |
| 25 factory HashMap.fromIterables(Iterable<K> keys, Iterable<V> values) { | 25 factory HashMap.fromIterables(Iterable<K> keys, Iterable<V> values) { |
| 26 HashMap<K, V> map = new HashMap<K, V>(); | 26 HashMap<K, V> map = new HashMap<K, V>(); |
| 27 Maps._fillMapWithIterables(map, keys, values); | 27 Maps._fillMapWithIterables(map, keys, values); |
| 28 return map; | 28 return map; |
| 29 } | 29 } |
| 30 } | 30 } |
| OLD | NEW |