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

Side by Side Diff: samples/swarm/DataSource.dart

Issue 14022007: Move Iterable implementation to collection. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Merge to head. Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/lib/immutable_map.dart ('k') | samples/swarm/swarmlib.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of swarmlib; 5 part of swarmlib;
6 6
7 /** The top-level collection of all sections for a user. */ 7 /** The top-level collection of all sections for a user. */
8 // TODO(jimhug): This is known as UserData in the server model. 8 // TODO(jimhug): This is known as UserData in the server model.
9 class Sections extends Iterable<Section> { 9 class Sections extends IterableBase<Section> {
10 final List<Section> _sections; 10 final List<Section> _sections;
11 11
12 Sections(this._sections); 12 Sections(this._sections);
13 13
14 operator [](int i) => _sections[i]; 14 operator [](int i) => _sections[i];
15 15
16 int get length => _sections.length; 16 int get length => _sections.length;
17 17
18 List<String> get sectionTitles => 18 List<String> get sectionTitles =>
19 _sections.map((s) => s.title).toList(); 19 _sections.map((s) => s.title).toList();
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 final hasThumbnail = decoder.readBool(); 231 final hasThumbnail = decoder.readBool();
232 final author = decoder.readString(); 232 final author = decoder.readString();
233 final dateInSeconds = decoder.readInt(); 233 final dateInSeconds = decoder.readInt();
234 final snippet = decoder.readString(); 234 final snippet = decoder.readString();
235 final date = 235 final date =
236 new DateTime.fromMillisecondsSinceEpoch(dateInSeconds*1000, isUtc: true) ; 236 new DateTime.fromMillisecondsSinceEpoch(dateInSeconds*1000, isUtc: true) ;
237 return new Article(source, id, date, title, author, srcUrl, hasThumbnail, 237 return new Article(source, id, date, title, author, srcUrl, hasThumbnail,
238 snippet); 238 snippet);
239 } 239 }
240 } 240 }
OLDNEW
« no previous file with comments | « runtime/lib/immutable_map.dart ('k') | samples/swarm/swarmlib.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698