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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 * | 44 * |
45 * This method returns a view of the mapped elements. As long as the | 45 * This method returns a view of the mapped elements. As long as the |
46 * returned [Iterable] is not iterated over, the supplied function [f] will | 46 * returned [Iterable] is not iterated over, the supplied function [f] will |
47 * not be invoked. The transformed elements will not be cached. Iterating | 47 * not be invoked. The transformed elements will not be cached. Iterating |
48 * multiple times over the the returned [Iterable] will invoke the supplied | 48 * multiple times over the the returned [Iterable] will invoke the supplied |
49 * function [f] multiple times on the same element. | 49 * function [f] multiple times on the same element. |
50 */ | 50 */ |
51 Iterable map(f(E element)) => new MappedIterable<E, dynamic>(this, f); | 51 Iterable map(f(E element)) => new MappedIterable<E, dynamic>(this, f); |
52 | 52 |
53 /** | 53 /** |
54 * Deprecated alias for [map]. | |
55 */ | |
56 @deprecated | |
57 Iterable mappedBy(f(E element)) => map(f); | |
58 | |
59 /** | |
60 * Returns a lazy [Iterable] with all elements that satisfy the | 54 * Returns a lazy [Iterable] with all elements that satisfy the |
61 * predicate [f]. | 55 * predicate [f]. |
62 * | 56 * |
63 * This method returns a view of the mapped elements. As long as the | 57 * This method returns a view of the mapped elements. As long as the |
64 * returned [Iterable] is not iterated over, the supplied function [f] will | 58 * returned [Iterable] is not iterated over, the supplied function [f] will |
65 * not be invoked. Iterating will not cache results, and thus iterating | 59 * not be invoked. Iterating will not cache results, and thus iterating |
66 * multiple times over the the returned [Iterable] will invoke the supplied | 60 * multiple times over the the returned [Iterable] will invoke the supplied |
67 * function [f] multiple times on the same element. | 61 * function [f] multiple times on the same element. |
68 */ | 62 */ |
69 Iterable<E> where(bool f(E element)) => new WhereIterable<E>(this, f); | 63 Iterable<E> where(bool f(E element)) => new WhereIterable<E>(this, f); |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 */ | 432 */ |
439 abstract class BiDirectionalIterator<T> extends Iterator<T> { | 433 abstract class BiDirectionalIterator<T> extends Iterator<T> { |
440 /** | 434 /** |
441 * Move back to the previous element. | 435 * Move back to the previous element. |
442 * | 436 * |
443 * Returns true and updates [current] if successful. Returns false | 437 * Returns true and updates [current] if successful. Returns false |
444 * and sets [current] to null if there is no previous element. | 438 * and sets [current] to null if there is no previous element. |
445 */ | 439 */ |
446 bool movePrevious(); | 440 bool movePrevious(); |
447 } | 441 } |
OLD | NEW |