Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Unified Diff: utils/pub/yaml/yaml_map.dart

Issue 11638010: Convert /** comments to /// in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Respond to review. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/pub/yaml/yaml.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « utils/pub/yaml/yaml.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698