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

Unified Diff: samples/swarm/DataSource.dart

Issue 11414069: Make mappedBy lazy. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Reupload due to error. Created 8 years, 1 month 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
Index: samples/swarm/DataSource.dart
diff --git a/samples/swarm/DataSource.dart b/samples/swarm/DataSource.dart
index dd7f62d6fcfe236c622764bf573928a2295a7671..658e8a5c1aa2af0f6c26718411238eae7f4a035d 100644
--- a/samples/swarm/DataSource.dart
+++ b/samples/swarm/DataSource.dart
@@ -14,7 +14,7 @@ class Sections extends Collection<Section> {
int get length => _sections.length;
List<String> get sectionTitles =>
- CollectionUtils.mappedBy(_sections, (s) => s.title);
+ _sections.mappedBy((s) => s.title).toList();
void refresh() {
// TODO(jimhug): http://b/issue?id=5351067
@@ -87,10 +87,6 @@ class Sections extends Collection<Section> {
List<Section> get sections => _sections;
// Collection<Section> methods:
- List mappedBy(f(Section element)) {
- return Collections.mappedBy(this, new List(), f);
- }
-
List<Section> where(bool f(Section element)) {
return Collections.where(this, new List<Section>(), f);
}

Powered by Google App Engine
This is Rietveld 408576698