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

Unified Diff: lib/core/sequences.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/core/iterator.dart ('k') | lib/coreimpl/collections.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/core/sequences.dart
diff --git a/lib/core/sequences.dart b/lib/core/sequences.dart
index 5ed4366aa2e91f58330897c94e713d0d814d0c27..c200d1bf355a5d80074f1ac0a97798f246d56de8 100644
--- a/lib/core/sequences.dart
+++ b/lib/core/sequences.dart
@@ -195,9 +195,9 @@ class SequenceIterator<E> implements Iterator<E> {
Sequence<E> _sequence;
int _position;
SequenceIterator(this._sequence) : _position = 0;
- bool hasNext() => _position < _sequence.length;
+ bool get hasNext => _position < _sequence.length;
E next() {
- if (hasNext()) return _sequence[_position++];
+ if (hasNext) return _sequence[_position++];
throw new NoMoreElementsException();
}
}
« no previous file with comments | « lib/core/iterator.dart ('k') | lib/coreimpl/collections.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698