Revert "Rename mappedBy to map." This reverts commit 17899. Review URL: https://codereview.chromium.org//12087103 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/yaml@17907 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/pkgs/yaml/lib/model.dart b/pkgs/yaml/lib/model.dart index 7a609b9..8c111af 100644 --- a/pkgs/yaml/lib/model.dart +++ b/pkgs/yaml/lib/model.dart
@@ -91,7 +91,7 @@ } String toString() => - '$tag [${Strings.join(content.map((e) => '$e'), ', ')}]'; + '$tag [${Strings.join(content.mappedBy((e) => '$e'), ', ')}]'; int get hashCode => super.hashCode ^ _hashCode(content); @@ -150,7 +150,7 @@ // TODO(nweiz): This could be faster if we used a RegExp to check for // special characters and short-circuited if they didn't exist. - var escapedValue = value.charCodes.map((c) { + var escapedValue = value.charCodes.mappedBy((c) { switch (c) { case _Parser.TAB: return "\\t"; case _Parser.LF: return "\\n"; @@ -223,7 +223,7 @@ String toString() { var strContent = content.keys - .map((k) => '${k}: ${content[k]}') + .mappedBy((k) => '${k}: ${content[k]}') .join(', '); return '$tag {$strContent}'; }
diff --git a/pkgs/yaml/lib/visitor.dart b/pkgs/yaml/lib/visitor.dart index 42dbb22..b5c14c9 100644 --- a/pkgs/yaml/lib/visitor.dart +++ b/pkgs/yaml/lib/visitor.dart
@@ -14,7 +14,7 @@ /// Visits each node in [seq] and returns a list of the results. visitSequence(_SequenceNode seq) - => seq.content.map((e) => e.visit(this)).toList(); + => seq.content.mappedBy((e) => e.visit(this)).toList(); /// Visits each key and value in [map] and returns a map of the results. visitMapping(_MappingNode map) {
diff --git a/pkgs/yaml/lib/yaml.dart b/pkgs/yaml/lib/yaml.dart index e905e76..ef0ac83 100644 --- a/pkgs/yaml/lib/yaml.dart +++ b/pkgs/yaml/lib/yaml.dart
@@ -60,8 +60,8 @@ /// are YamlMaps. These have a few small behavioral differences from the default /// Map implementation; for details, see the YamlMap class. List loadYamlStream(String yaml) { - return new _Parser(yaml).l_yamlStream() - .map((doc) => new _Constructor(new _Composer(doc).compose()).construct()) + return new _Parser(yaml).l_yamlStream().mappedBy((doc) => + new _Constructor(new _Composer(doc).compose()).construct()) .toList(); }
diff --git a/pkgs/yaml/lib/yaml_map.dart b/pkgs/yaml/lib/yaml_map.dart index cbf18e5..65dd119 100644 --- a/pkgs/yaml/lib/yaml_map.dart +++ b/pkgs/yaml/lib/yaml_map.dart
@@ -29,7 +29,7 @@ void clear() => _map.clear(); void forEach(void f(key, value)) => _map.forEach((k, v) => f(_unwrapKey(k), v)); - Iterable get keys => _map.keys.map(_unwrapKey); + Iterable get keys => _map.keys.mappedBy(_unwrapKey); Iterable get values => _map.values; int get length => _map.length; bool get isEmpty => _map.isEmpty;