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

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

Issue 15263004: Adding isNotEmpty property to collection and string. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix template generation Created 7 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 | Annotate | Revision Log
« no previous file with comments | « sdk/lib/collection/splay_tree.dart ('k') | sdk/lib/core/map.dart » ('j') | 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 * 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 * therefore be slow. 155 * therefore be slow.
156 */ 156 */
157 int get length; 157 int get length;
158 158
159 /** 159 /**
160 * Returns true if there is no element in this collection. 160 * Returns true if there is no element in this collection.
161 */ 161 */
162 bool get isEmpty; 162 bool get isEmpty;
163 163
164 /** 164 /**
165 * Returns true if there is at least one element in this collection.
166 */
167 bool get isNotEmpty;
168
169 /**
165 * Returns an [Iterable] with at most [n] elements. 170 * Returns an [Iterable] with at most [n] elements.
166 * 171 *
167 * The returned [Iterable] may contain fewer than [n] elements, if `this` 172 * The returned [Iterable] may contain fewer than [n] elements, if `this`
168 * contains fewer than [n] elements. 173 * contains fewer than [n] elements.
169 */ 174 */
170 Iterable<E> take(int n); 175 Iterable<E> take(int n);
171 176
172 /** 177 /**
173 * Returns an [Iterable] that stops once [test] is not satisfied anymore. 178 * Returns an [Iterable] that stops once [test] is not satisfied anymore.
174 * 179 *
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 */ 303 */
299 abstract class BidirectionalIterator<E> implements Iterator<E> { 304 abstract class BidirectionalIterator<E> implements Iterator<E> {
300 /** 305 /**
301 * Move back to the previous element. 306 * Move back to the previous element.
302 * 307 *
303 * Returns true and updates [current] if successful. Returns false 308 * Returns true and updates [current] if successful. Returns false
304 * and sets [current] to null if there is no previous element. 309 * and sets [current] to null if there is no previous element.
305 */ 310 */
306 bool movePrevious(); 311 bool movePrevious();
307 } 312 }
OLDNEW
« no previous file with comments | « sdk/lib/collection/splay_tree.dart ('k') | sdk/lib/core/map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698