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

Side by Side Diff: tools/dom/templates/immutable_list_mixin.darttemplate

Issue 14425003: Make List.remove return boolean. (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
« no previous file with comments | « tools/dom/templates/html/impl/impl_Node.darttemplate ('k') | no next file » | 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> get iterator { 6 Iterator<$E> get 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 } 152 }
153 153
154 $E removeAt(int pos) { 154 $E removeAt(int pos) {
155 throw new UnsupportedError("Cannot remove from immutable List."); 155 throw new UnsupportedError("Cannot remove from immutable List.");
156 } 156 }
157 157
158 $E removeLast() { 158 $E removeLast() {
159 throw new UnsupportedError("Cannot remove from immutable List."); 159 throw new UnsupportedError("Cannot remove from immutable List.");
160 } 160 }
161 161
162 void remove(Object object) { 162 bool remove(Object object) {
163 throw new UnsupportedError("Cannot remove from immutable List."); 163 throw new UnsupportedError("Cannot remove from immutable List.");
164 } 164 }
165 165
166 void removeWhere(bool test($E element)) { 166 void removeWhere(bool test($E element)) {
167 throw new UnsupportedError("Cannot remove from immutable List."); 167 throw new UnsupportedError("Cannot remove from immutable List.");
168 } 168 }
169 169
170 void retainWhere(bool test($E element)) { 170 void retainWhere(bool test($E element)) {
171 throw new UnsupportedError("Cannot remove from immutable List."); 171 throw new UnsupportedError("Cannot remove from immutable List.");
172 } 172 }
(...skipping 30 matching lines...) Expand all
203 IterableMixinWorkaround.asMapList(this); 203 IterableMixinWorkaround.asMapList(this);
204 204
205 String toString() { 205 String toString() {
206 StringBuffer buffer = new StringBuffer('['); 206 StringBuffer buffer = new StringBuffer('[');
207 buffer.writeAll(this, ', '); 207 buffer.writeAll(this, ', ');
208 buffer.write(']'); 208 buffer.write(']');
209 return buffer.toString(); 209 return buffer.toString();
210 } 210 }
211 211
212 // -- end List<$E> mixins. 212 // -- end List<$E> mixins.
OLDNEW
« no previous file with comments | « tools/dom/templates/html/impl/impl_Node.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698