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

Side by Side Diff: lib/html/templates/immutable_list_mixin.darttemplate

Issue 11238035: Make isEmpty a getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 1 month 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/html/src/native_DOMImplementation.dart ('k') | lib/uri/helpers.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 // -- start List<$E> mixins. 1 // -- start List<$E> mixins.
2 // $E is the element type. 2 // $E is the element type.
3 3
4 // From Iterable<$E>: 4 // From Iterable<$E>:
5 5
6 Iterator<$E> iterator() { 6 Iterator<$E> iterator() {
7 // Note: NodeLists are not fixed size. And most probably length shouldn't 7 // Note: NodeLists are not fixed size. And most probably length shouldn't
8 // be cached in both iterator _and_ forEach method. For now caching it 8 // be cached in both iterator _and_ forEach method. For now caching it
9 // for consistency. 9 // for consistency.
10 return new _FixedSizeListIterator<$E>(this); 10 return new _FixedSizeListIterator<$E>(this);
(...skipping 23 matching lines...) Expand all
34 34
35 Collection map(f($E element)) => _Collections.map(this, [], f); 35 Collection map(f($E element)) => _Collections.map(this, [], f);
36 36
37 Collection<$E> filter(bool f($E element)) => 37 Collection<$E> filter(bool f($E element)) =>
38 _Collections.filter(this, <$E>[], f); 38 _Collections.filter(this, <$E>[], f);
39 39
40 bool every(bool f($E element)) => _Collections.every(this, f); 40 bool every(bool f($E element)) => _Collections.every(this, f);
41 41
42 bool some(bool f($E element)) => _Collections.some(this, f); 42 bool some(bool f($E element)) => _Collections.some(this, f);
43 43
44 bool isEmpty() => this.length == 0; 44 bool get isEmpty => this.length == 0;
45 45
46 // From List<$E>: 46 // From List<$E>:
47 47
48 void sort([Comparator<$E> compare = Comparable.compare]) { 48 void sort([Comparator<$E> compare = Comparable.compare]) {
49 throw new UnsupportedError("Cannot sort immutable List."); 49 throw new UnsupportedError("Cannot sort immutable List.");
50 } 50 }
51 51
52 int indexOf($E element, [int start = 0]) => 52 int indexOf($E element, [int start = 0]) =>
53 _Lists.indexOf(this, element, start, this.length); 53 _Lists.indexOf(this, element, start, this.length);
54 54
(...skipping 17 matching lines...) Expand all
72 } 72 }
73 73
74 void insertRange(int start, int rangeLength, [$E initialValue]) { 74 void insertRange(int start, int rangeLength, [$E initialValue]) {
75 throw new UnsupportedError("Cannot insertRange on immutable List."); 75 throw new UnsupportedError("Cannot insertRange on immutable List.");
76 } 76 }
77 77
78 List<$E> getRange(int start, int rangeLength) => 78 List<$E> getRange(int start, int rangeLength) =>
79 _Lists.getRange(this, start, rangeLength, <$E>[]); 79 _Lists.getRange(this, start, rangeLength, <$E>[]);
80 80
81 // -- end List<$E> mixins. 81 // -- end List<$E> mixins.
OLDNEW
« no previous file with comments | « lib/html/src/native_DOMImplementation.dart ('k') | lib/uri/helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698