Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: sdk/lib/core/iterable.dart

Issue 1986243002: Fix Iterable.where documentation by updating its signature. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 * 162 *
163 * The matching elements have the same order in the returned iterable 163 * The matching elements have the same order in the returned iterable
164 * as they have in [iterator]. 164 * as they have in [iterator].
165 * 165 *
166 * This method returns a view of the mapped elements. As long as the 166 * This method returns a view of the mapped elements. As long as the
167 * returned [Iterable] is not iterated over, the supplied function [test] will 167 * returned [Iterable] is not iterated over, the supplied function [test] will
168 * not be invoked. Iterating will not cache results, and thus iterating 168 * not be invoked. Iterating will not cache results, and thus iterating
169 * multiple times over the returned [Iterable] will invoke the supplied 169 * multiple times over the returned [Iterable] will invoke the supplied
170 * function [test] multiple times on the same element. 170 * function [test] multiple times on the same element.
171 */ 171 */
172 Iterable<E> where(bool f(E element)) => new WhereIterable<E>(this, f); 172 Iterable<E> where(bool test(E element)) =>
173 new WhereIterable<E>(this, test);
Lasse Reichstein Nielsen 2016/05/17 18:28:23 Are you sure it didn't fit one one line?
173 174
174 /** 175 /**
175 * Expands each element of this [Iterable] into zero or more elements. 176 * Expands each element of this [Iterable] into zero or more elements.
176 * 177 *
177 * The resulting Iterable runs through the elements returned 178 * The resulting Iterable runs through the elements returned
178 * by [f] for each element of this, in iteration order. 179 * by [f] for each element of this, in iteration order.
179 * 180 *
180 * The returned [Iterable] is lazy, and calls [f] for each element 181 * The returned [Iterable] is lazy, and calls [f] for each element
181 * of this every time it's iterated. 182 * of this every time it's iterated.
182 */ 183 */
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 */ 674 */
674 abstract class BidirectionalIterator<E> implements Iterator<E> { 675 abstract class BidirectionalIterator<E> implements Iterator<E> {
675 /** 676 /**
676 * Move back to the previous element. 677 * Move back to the previous element.
677 * 678 *
678 * Returns true and updates [current] if successful. Returns false 679 * Returns true and updates [current] if successful. Returns false
679 * and sets [current] to null if there is no previous element. 680 * and sets [current] to null if there is no previous element.
680 */ 681 */
681 bool movePrevious(); 682 bool movePrevious();
682 } 683 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698