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

Side by Side Diff: tool/input_sdk/lib/core/iterable.dart

Issue 1059583002: Extension method support to move us closer to a valid List implementation. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: done Created 5 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
« no previous file with comments | « tool/input_sdk/lib/core/annotations.dart ('k') | tool/input_sdk/lib/core/list.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 dart.core; 5 part of dart.core;
6 6
7 /** 7 /**
8 * An object that uses an [Iterator] to serve objects one at a time. 8 * An object that uses an [Iterator] to serve objects one at a time.
9 * 9 *
10 * You can iterate over all objects served by an Iterable object 10 * You can iterate over all objects served by an Iterable object
(...skipping 13 matching lines...) Expand all
24 * 24 *
25 * You can implement Iterable in your own class. 25 * You can implement Iterable in your own class.
26 * If you do, then an instance of your Iterable class 26 * If you do, then an instance of your Iterable class
27 * can be the right-hand side of a for-in construct. 27 * can be the right-hand side of a for-in construct.
28 * 28 *
29 * Some subclasss of [Iterable] can be modified. It is generally not allowed 29 * Some subclasss of [Iterable] can be modified. It is generally not allowed
30 * to modify such collections while they are being iterated. Doing so will break 30 * to modify such collections while they are being iterated. Doing so will break
31 * the iteration, which is typically signalled by throwing a 31 * the iteration, which is typically signalled by throwing a
32 * [ConcurrentModificationError] when it is detected. 32 * [ConcurrentModificationError] when it is detected.
33 */ 33 */
34 @SupportJsExtensionMethods()
34 abstract class Iterable<E> { 35 abstract class Iterable<E> {
35 const Iterable(); 36 const Iterable();
36 37
37 /** 38 /**
38 * Creates an Iterable that generates its elements dynamically. 39 * Creates an Iterable that generates its elements dynamically.
39 * 40 *
40 * The Iterators created by the Iterable count from 41 * The Iterators created by the Iterable count from
41 * zero to [:count - 1:] while iterating, and call [generator] 42 * zero to [:count - 1:] while iterating, and call [generator]
42 * with that index to create the next value. 43 * with that index to create the next value.
43 * 44 *
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 */ 371 */
371 abstract class BidirectionalIterator<E> implements Iterator<E> { 372 abstract class BidirectionalIterator<E> implements Iterator<E> {
372 /** 373 /**
373 * Move back to the previous element. 374 * Move back to the previous element.
374 * 375 *
375 * Returns true and updates [current] if successful. Returns false 376 * Returns true and updates [current] if successful. Returns false
376 * and sets [current] to null if there is no previous element. 377 * and sets [current] to null if there is no previous element.
377 */ 378 */
378 bool movePrevious(); 379 bool movePrevious();
379 } 380 }
OLDNEW
« no previous file with comments | « tool/input_sdk/lib/core/annotations.dart ('k') | tool/input_sdk/lib/core/list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698