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

Unified Diff: pkg/serialization/lib/src/basic_rule.dart

Issue 12086062: Rename mappedBy to map. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Undo change to test-script. Created 7 years, 11 months 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 | « pkg/path/lib/path.dart ('k') | pkg/serialization/lib/src/format.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/serialization/lib/src/basic_rule.dart
diff --git a/pkg/serialization/lib/src/basic_rule.dart b/pkg/serialization/lib/src/basic_rule.dart
index c989b2bdd3f189f0fba4c164e875107f655aa2fb..4b0b529e0b8a9ccd12b9643a0baac9c11672d235 100644
--- a/pkg/serialization/lib/src/basic_rule.dart
+++ b/pkg/serialization/lib/src/basic_rule.dart
@@ -533,13 +533,13 @@ class _FieldList extends Iterable {
List get constructorFields => _constructorFields;
List constructorFieldNames() =>
- constructorFields.mappedBy((x) => x.name).toList();
+ constructorFields.map((x) => x.name).toList();
List constructorFieldIndices() =>
- constructorFields.mappedBy((x) => x.index).toList();
+ constructorFields.map((x) => x.index).toList();
List regularFields() => contents.where((x) => !x.usedInConstructor).toList();
- List regularFieldNames() => regularFields().mappedBy((x) => x.name).toList();
+ List regularFieldNames() => regularFields().map((x) => x.name).toList();
List regularFieldIndices() =>
- regularFields().mappedBy((x) => x.index).toList();
+ regularFields().map((x) => x.index).toList();
/**
* If we weren't given any non-constructor fields to use, figure out what
@@ -549,7 +549,7 @@ class _FieldList extends Iterable {
*/
void figureOutFields() {
Iterable names(Iterable<DeclarationMirror> mirrors) =>
- mirrors.mappedBy((each) => each.simpleName).toList();
+ mirrors.map((each) => each.simpleName).toList();
if (!_shouldFigureOutFields || !regularFields().isEmpty) return;
var fields = publicFields(mirror);
@@ -606,7 +606,7 @@ class Constructor {
*/
constructFrom(state, Reader r) {
// TODO(alanknight): Handle named parameters
- Collection inflated = fieldNumbers.mappedBy(
+ Collection inflated = fieldNumbers.map(
(x) => (x is int) ? reflect(r.inflateReference(state[x])) : reflect(x));
var result = type.newInstance(name, inflated.toList());
return deprecatedFutureValue(result);
« no previous file with comments | « pkg/path/lib/path.dart ('k') | pkg/serialization/lib/src/format.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698