OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
| 5 part of yaml; |
| 6 |
5 /** | 7 /** |
6 * This class wraps behaves almost identically to the normal Dart Map | 8 * This class wraps behaves almost identically to the normal Dart Map |
7 * implementation, with the following differences: | 9 * implementation, with the following differences: |
8 * | 10 * |
9 * * It allows null, NaN, boolean, list, and map keys. | 11 * * It allows null, NaN, boolean, list, and map keys. |
10 * * It defines `==` structurally. That is, `yamlMap1 == yamlMap2` if they have | 12 * * It defines `==` structurally. That is, `yamlMap1 == yamlMap2` if they have |
11 * the same contents. | 13 * the same contents. |
12 * * It has a compatible [hashCode] method. | 14 * * It has a compatible [hashCode] method. |
13 */ | 15 */ |
14 class YamlMap implements Map { | 16 class YamlMap implements Map { |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 for (var e in obj) { | 107 for (var e in obj) { |
106 hash ^= _hashCode(e, parents); | 108 hash ^= _hashCode(e, parents); |
107 } | 109 } |
108 return hash; | 110 return hash; |
109 } | 111 } |
110 return obj.hashCode; | 112 return obj.hashCode; |
111 } finally { | 113 } finally { |
112 parents.removeLast(); | 114 parents.removeLast(); |
113 } | 115 } |
114 } | 116 } |
OLD | NEW |