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

Side by Side Diff: lib/core/collection.dart

Issue 11230011: Make hasNext a getter instead of a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove unused variable. Created 8 years, 2 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 | « lib/compiler/implementation/util/link_implementation.dart ('k') | lib/core/iterator.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 /** 5 /**
6 * The common interface of all collections. 6 * The common interface of all collections.
7 * 7 *
8 * The [Collection] class contains a skeleton implementation of 8 * The [Collection] class contains a skeleton implementation of
9 * an iterator based collection. 9 * an iterator based collection.
10 */ 10 */
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 bool some(bool f(E element)) { 88 bool some(bool f(E element)) {
89 for (E element in this) { 89 for (E element in this) {
90 if (f(element)) return true; 90 if (f(element)) return true;
91 } 91 }
92 return false; 92 return false;
93 } 93 }
94 94
95 /** 95 /**
96 * Returns true if there is no element in this collection. 96 * Returns true if there is no element in this collection.
97 */ 97 */
98 bool isEmpty() => !iterator().hasNext(); 98 bool isEmpty() => !iterator().hasNext;
99 } 99 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/util/link_implementation.dart ('k') | lib/core/iterator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698