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

Side by Side Diff: sdk/lib/_collection_dev/iterable.dart

Issue 11938036: Hide collection-dev library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Disallow importing dart:_collection_dev in dart2js. Created 7 years, 10 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
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 dart.collection.dev; 5 part of dart._collection.dev;
6 6
7 typedef T _Transformation<S, T>(S value); 7 typedef T _Transformation<S, T>(S value);
8 8
9 class MappedIterable<S, T> extends Iterable<T> { 9 class MappedIterable<S, T> extends Iterable<T> {
10 final Iterable<S> _iterable; 10 final Iterable<S> _iterable;
11 // TODO(ahe): Restore type when feature is implemented in dart2js 11 // TODO(ahe): Restore type when feature is implemented in dart2js
12 // checked mode. http://dartbug.com/7733 12 // checked mode. http://dartbug.com/7733
13 final /* _Transformation<S, T> */ _f; 13 final /* _Transformation<S, T> */ _f;
14 14
15 MappedIterable(this._iterable, T this._f(S element)); 15 MappedIterable(this._iterable, T this._f(S element));
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 _hasSkipped = true; 217 _hasSkipped = true;
218 while (_iterator.moveNext()) { 218 while (_iterator.moveNext()) {
219 if (!_f(_iterator.current)) return true; 219 if (!_f(_iterator.current)) return true;
220 } 220 }
221 } 221 }
222 return _iterator.moveNext(); 222 return _iterator.moveNext();
223 } 223 }
224 224
225 E get current => _iterator.current; 225 E get current => _iterator.current;
226 } 226 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698