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(); |
+} |