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

Unified 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: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/core/string.dart » ('j') | sdk/lib/core/string.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/iterable.dart
diff --git a/sdk/lib/core/iterable.dart b/sdk/lib/core/iterable.dart
index e13f2feedbf516f8d83e55095fe94b08ee6cef60..32d6046d0113ce79ae28c820d9de2259976bbe89 100644
--- a/sdk/lib/core/iterable.dart
+++ b/sdk/lib/core/iterable.dart
@@ -413,3 +413,16 @@ class _GeneratorIterator<E> implements Iterator<E> {
E get current => _current;
}
+
+/**
+ * An [Iterator] that allows moving backwards as well as forwards.
+ */
+abstract class BiDirectionalIterator<T> extends Iterator<T> {
+ /**
+ * Move back to the previous element.
+ *
+ * Returns true and updates [current] if successful. Returns false
+ * and sets [current] to null if there is no previous element.
+ */
+ bool movePrevious();
+}
« no previous file with comments | « no previous file | sdk/lib/core/string.dart » ('j') | sdk/lib/core/string.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698