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

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

Issue 14246008: Allow Object when doing lookups. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
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 * 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
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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 */ 295 */
296 abstract class BidirectionalIterator<E> implements Iterator<E> { 296 abstract class BidirectionalIterator<E> implements Iterator<E> {
297 /** 297 /**
298 * Move back to the previous element. 298 * Move back to the previous element.
299 * 299 *
300 * Returns true and updates [current] if successful. Returns false 300 * Returns true and updates [current] if successful. Returns false
301 * and sets [current] to null if there is no previous element. 301 * and sets [current] to null if there is no previous element.
302 */ 302 */
303 bool movePrevious(); 303 bool movePrevious();
304 } 304 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698