OLD | NEW |
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; |
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 | 676 |
677 Set toSet() => new Set<E>(); | 677 Set toSet() => new Set<E>(); |
678 } | 678 } |
679 | 679 |
680 /** The always empty iterator. */ | 680 /** The always empty iterator. */ |
681 class EmptyIterator<E> implements Iterator<E> { | 681 class EmptyIterator<E> implements Iterator<E> { |
682 const EmptyIterator(); | 682 const EmptyIterator(); |
683 bool moveNext() => false; | 683 bool moveNext() => false; |
684 E get current => null; | 684 E get current => null; |
685 } | 685 } |
| 686 |
| 687 /** An [Iterator] that can move in both directions. */ |
| 688 abstract class BiDirectionalIterator<T> implements Iterator<T> { |
| 689 bool movePrevious(); |
| 690 } |
OLD | NEW |