| OLD | NEW |
| 1 part of dart.collection; | 1 part of dart.collection; |
| 2 | 2 |
| 3 abstract class LinkedHashMap<K, V> implements HashMap<K, V> { | 3 abstract class LinkedHashMap<K, V> implements HashMap<K, V> { |
| 4 factory LinkedHashMap({bool equals(K key1, K key2), int hashCode(K key), | 4 external factory LinkedHashMap({bool equals(K key1, K key2), |
| 5 bool isValidKey(potentialKey)}) { | 5 int hashCode(K key), bool isValidKey(potentialKey)}); |
| 6 if (isValidKey == null) { | 6 external factory LinkedHashMap.identity(); |
| 7 if (hashCode == null) { | |
| 8 if (equals == null) { | |
| 9 return new _LinkedHashMap<K, V>(); | |
| 10 } | |
| 11 hashCode = _defaultHashCode; | |
| 12 } else { | |
| 13 if (identical(identityHashCode, hashCode) && | |
| 14 identical(identical, equals)) { | |
| 15 return new _LinkedIdentityHashMap<K, V>(); | |
| 16 } | |
| 17 if (equals == null) { | |
| 18 equals = _defaultEquals; | |
| 19 } | |
| 20 } | |
| 21 } else { | |
| 22 if (hashCode == null) { | |
| 23 hashCode = _defaultHashCode; | |
| 24 } | |
| 25 if (equals == null) { | |
| 26 equals = _defaultEquals; | |
| 27 } | |
| 28 } | |
| 29 return new _LinkedCustomHashMap<K, V>(equals, hashCode, isValidKey); | |
| 30 } | |
| 31 factory LinkedHashMap.identity() = _LinkedIdentityHashMap<K, V>; | |
| 32 factory LinkedHashMap.from(Map other) { | 7 factory LinkedHashMap.from(Map other) { |
| 33 LinkedHashMap<K, V> result = new LinkedHashMap<K, V>(); | 8 LinkedHashMap<K, V> result = new LinkedHashMap<K, V>(); |
| 34 other.forEach((k, v) { | 9 other.forEach((k, v) { |
| 35 result[k] = DDC$RT.cast(v, dynamic, V, "CastGeneral", | 10 result[k] = DDC$RT.cast(v, dynamic, V, "CastGeneral", |
| 36 """line 99, column 40 of dart:collection/linked_hash_map.dart: """, | 11 """line 74, column 40 of dart:collection/linked_hash_map.dart: """, |
| 37 v is V, false); | 12 v is V, false); |
| 38 }); | 13 }); |
| 39 return result; | 14 return result; |
| 40 } | 15 } |
| 41 factory LinkedHashMap.fromIterable(Iterable iterable, | 16 factory LinkedHashMap.fromIterable(Iterable iterable, |
| 42 {K key(element), V value(element)}) { | 17 {K key(element), V value(element)}) { |
| 43 LinkedHashMap<K, V> map = new LinkedHashMap<K, V>(); | 18 LinkedHashMap<K, V> map = new LinkedHashMap<K, V>(); |
| 44 Maps._fillMapWithMappedIterable(map, iterable, key, value); | 19 Maps._fillMapWithMappedIterable(map, iterable, key, value); |
| 45 return map; | 20 return map; |
| 46 } | 21 } |
| 47 factory LinkedHashMap.fromIterables(Iterable<K> keys, Iterable<V> values) { | 22 factory LinkedHashMap.fromIterables(Iterable<K> keys, Iterable<V> values) { |
| 48 LinkedHashMap<K, V> map = new LinkedHashMap<K, V>(); | 23 LinkedHashMap<K, V> map = new LinkedHashMap<K, V>(); |
| 49 Maps._fillMapWithIterables(map, keys, values); | 24 Maps._fillMapWithIterables(map, keys, values); |
| 50 return map; | 25 return map; |
| 51 } | 26 } |
| 52 } | 27 } |
| OLD | NEW |