| 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.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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 * by [f] for each element of this, in order. | 69 * by [f] for each element of this, in order. |
| 70 * | 70 * |
| 71 * The returned [Iterable] is lazy, and will call [f] for each element | 71 * The returned [Iterable] is lazy, and will call [f] for each element |
| 72 * of this every time it's iterated. | 72 * of this every time it's iterated. |
| 73 */ | 73 */ |
| 74 Iterable expand(Iterable f(E element)); | 74 Iterable expand(Iterable f(E element)); |
| 75 | 75 |
| 76 /** | 76 /** |
| 77 * Check whether the collection contains an element equal to [element]. | 77 * Check whether the collection contains an element equal to [element]. |
| 78 */ | 78 */ |
| 79 bool contains(E element); | 79 bool contains(Object element); |
| 80 | 80 |
| 81 /** | 81 /** |
| 82 * Applies the function [f] to each element of this collection. | 82 * Applies the function [f] to each element of this collection. |
| 83 */ | 83 */ |
| 84 void forEach(void f(E element)); | 84 void forEach(void f(E element)); |
| 85 | 85 |
| 86 /** | 86 /** |
| 87 * Reduces a collection to a single value by iteratively combining elements | 87 * Reduces a collection to a single value by iteratively combining elements |
| 88 * of the collection using the provided function. | 88 * of the collection using the provided function. |
| 89 * | 89 * |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 */ | 307 */ |
| 308 abstract class BidirectionalIterator<E> implements Iterator<E> { | 308 abstract class BidirectionalIterator<E> implements Iterator<E> { |
| 309 /** | 309 /** |
| 310 * Move back to the previous element. | 310 * Move back to the previous element. |
| 311 * | 311 * |
| 312 * Returns true and updates [current] if successful. Returns false | 312 * Returns true and updates [current] if successful. Returns false |
| 313 * and sets [current] to null if there is no previous element. | 313 * and sets [current] to null if there is no previous element. |
| 314 */ | 314 */ |
| 315 bool movePrevious(); | 315 bool movePrevious(); |
| 316 } | 316 } |
| OLD | NEW |