| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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; |
| 6 |
| 5 /** | 7 /** |
| 6 * The [Iterator] class provides methods to iterate over an object. It | 8 * The [Iterator] class provides methods to iterate over an object. It |
| 7 * is transparently used by the for-in construct to test for the end | 9 * is transparently used by the for-in construct to test for the end |
| 8 * of the iteration, and to get the elements. | 10 * of the iteration, and to get the elements. |
| 9 * | 11 * |
| 10 * If the object iterated over is changed during the iteration, the | 12 * If the object iterated over is changed during the iteration, the |
| 11 * behavior is unspecified. | 13 * behavior is unspecified. |
| 12 */ | 14 */ |
| 13 abstract class Iterator<E> { | 15 abstract class Iterator<E> { |
| 14 /** | 16 /** |
| 15 * Gets the next element in the iteration. Throws a | 17 * Gets the next element in the iteration. Throws a |
| 16 * [StateError] if no element is left. | 18 * [StateError] if no element is left. |
| 17 */ | 19 */ |
| 18 E next(); | 20 E next(); |
| 19 | 21 |
| 20 /** | 22 /** |
| 21 * Returns whether the [Iterator] has elements left. | 23 * Returns whether the [Iterator] has elements left. |
| 22 */ | 24 */ |
| 23 bool get hasNext; | 25 bool get hasNext; |
| 24 } | 26 } |
| OLD | NEW |