| 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 * A collection of values, or "elements", that can be accessed sequentially. | 8 * A collection of values, or "elements", that can be accessed sequentially. |
| 9 * | 9 * |
| 10 * The elements of the iterable are accessed by getting an [Iterator] | 10 * The elements of the iterable are accessed by getting an [Iterator] |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 } | 329 } |
| 330 return false; | 330 return false; |
| 331 } | 331 } |
| 332 | 332 |
| 333 /** | 333 /** |
| 334 * Creates a [List] containing the elements of this [Iterable]. | 334 * Creates a [List] containing the elements of this [Iterable]. |
| 335 * | 335 * |
| 336 * The elements are in iteration order. | 336 * The elements are in iteration order. |
| 337 * The list is fixed-length if [growable] is false. | 337 * The list is fixed-length if [growable] is false. |
| 338 */ | 338 */ |
| 339 List<E> toList({ bool growable: true }) => | 339 List<E> toList({bool growable: true}) { |
| 340 new List<E>.from(this, growable: growable); | 340 return new List<E>.from(this, growable: growable); |
| 341 } |
| 341 | 342 |
| 342 /** | 343 /** |
| 343 * Creates a [Set] containing the same elements as this iterable. | 344 * Creates a [Set] containing the same elements as this iterable. |
| 344 * | 345 * |
| 345 * The set may contain fewer elements than the iterable, | 346 * The set may contain fewer elements than the iterable, |
| 346 * if the iterable contains an element more than once, | 347 * if the iterable contains an element more than once, |
| 347 * or it contains one or more elements that are equal. | 348 * or it contains one or more elements that are equal. |
| 348 * The order of the elements in the set is not guaranteed to be the same | 349 * The order of the elements in the set is not guaranteed to be the same |
| 349 * as for the iterable. | 350 * as for the iterable. |
| 350 */ | 351 */ |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 */ | 638 */ |
| 638 abstract class BidirectionalIterator<E> implements Iterator<E> { | 639 abstract class BidirectionalIterator<E> implements Iterator<E> { |
| 639 /** | 640 /** |
| 640 * Move back to the previous element. | 641 * Move back to the previous element. |
| 641 * | 642 * |
| 642 * Returns true and updates [current] if successful. Returns false | 643 * Returns true and updates [current] if successful. Returns false |
| 643 * and sets [current] to null if there is no previous element. | 644 * and sets [current] to null if there is no previous element. |
| 644 */ | 645 */ |
| 645 bool movePrevious(); | 646 bool movePrevious(); |
| 646 } | 647 } |
| OLD | NEW |