Index: utils/pub/yaml/yaml_map.dart |
diff --git a/utils/pub/yaml/yaml_map.dart b/utils/pub/yaml/yaml_map.dart |
index 040ac3ebac8750e9ba06951899a97b381a80f2fe..285027ceaa21fa0a10a7b00a1a358651cb6a1ce4 100644 |
--- a/utils/pub/yaml/yaml_map.dart |
+++ b/utils/pub/yaml/yaml_map.dart |
@@ -4,15 +4,13 @@ |
part of yaml; |
-/** |
- * This class wraps behaves almost identically to the normal Dart Map |
- * implementation, with the following differences: |
- * |
- * * It allows null, NaN, boolean, list, and map keys. |
- * * It defines `==` structurally. That is, `yamlMap1 == yamlMap2` if they have |
- * the same contents. |
- * * It has a compatible [hashCode] method. |
- */ |
+/// This class wraps behaves almost identically to the normal Dart Map |
+/// implementation, with the following differences: |
+/// |
+/// * It allows null, NaN, boolean, list, and map keys. |
+/// * It defines `==` structurally. That is, `yamlMap1 == yamlMap2` if they |
+/// have the same contents. |
+/// * It has a compatible [hashCode] method. |
class YamlMap implements Map { |
Map _map; |
@@ -44,7 +42,7 @@ class YamlMap implements Map { |
return deepEquals(this, other); |
} |
- /** Wraps an object for use as a key in the map. */ |
+ /// Wraps an object for use as a key in the map. |
_wrapKey(obj) { |
if (obj != null && obj is! bool && obj is! List && |
(obj is! double || !obj.isNan()) && |
@@ -56,14 +54,12 @@ class YamlMap implements Map { |
return new _WrappedHashKey(obj); |
} |
- /** Unwraps an object that was used as a key in the map. */ |
+ /// Unwraps an object that was used as a key in the map. |
_unwrapKey(obj) => obj is _WrappedHashKey ? obj.value : obj; |
} |
-/** |
- * A class for wrapping normally-unhashable objects that are being used as keys |
- * in a YamlMap. |
- */ |
+/// A class for wrapping normally-unhashable objects that are being used as keys |
+/// in a YamlMap. |
class _WrappedHashKey { |
var value; |
@@ -73,17 +69,15 @@ class _WrappedHashKey { |
String toString() => value.toString(); |
- /** This is defined as both values being structurally equal. */ |
+ /// This is defined as both values being structurally equal. |
bool operator ==(other) { |
if (other is! _WrappedHashKey) return false; |
return deepEquals(this.value, other.value); |
} |
} |
-/** |
- * Returns the hash code for [obj]. This includes null, true, false, maps, and |
- * lists. Also handles self-referential structures. |
- */ |
+/// Returns the hash code for [obj]. This includes null, true, false, maps, and |
+/// lists. Also handles self-referential structures. |
int _hashCode(obj, [List parents]) { |
if (parents == null) { |
parents = []; |
@@ -101,8 +95,8 @@ int _hashCode(obj, [List parents]) { |
_hashCode(obj.values, parents); |
} |
if (obj is List) { |
- // This is probably a really bad hash function, but presumably we'll get this |
- // in the standard library before it actually matters. |
+ // This is probably a really bad hash function, but presumably we'll get |
+ // this in the standard library before it actually matters. |
int hash = 0; |
for (var e in obj) { |
hash ^= _hashCode(e, parents); |