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

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

Issue 12094056: Runes, a bi-directional code-point iterator/iterable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Make rawIndex return null if there is no current rune. 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.core; 5 part of dart.core;
6 6
7 /** 7 /**
8 * The [Iterable] interface allows to get an [Iterator] out of an 8 * The [Iterable] interface allows to get an [Iterator] out of an
9 * [Iterable] object. 9 * [Iterable] object.
10 * 10 *
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 _index++; 425 _index++;
426 return true; 426 return true;
427 } else { 427 } else {
428 _current = null; 428 _current = null;
429 return false; 429 return false;
430 } 430 }
431 } 431 }
432 432
433 E get current => _current; 433 E get current => _current;
434 } 434 }
435
436 /**
437 * An [Iterator] that allows moving backwards as well as forwards.
438 */
439 abstract class BiDirectionalIterator<T> extends Iterator<T> {
440 /**
441 * Move back to the previous element.
442 *
443 * Returns true and updates [current] if successful. Returns false
444 * and sets [current] to null if there is no previous element.
445 */
446 bool movePrevious();
447 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698