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