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

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

Issue 13863012: Refactor List.setRange function. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments. 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
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 157
158 void removeWhere(bool test($E element)) { 158 void removeWhere(bool test($E element)) {
159 throw new UnsupportedError("Cannot remove from immutable List."); 159 throw new UnsupportedError("Cannot remove from immutable List.");
160 } 160 }
161 161
162 void retainWhere(bool test($E element)) { 162 void retainWhere(bool test($E element)) {
163 throw new UnsupportedError("Cannot remove from immutable List."); 163 throw new UnsupportedError("Cannot remove from immutable List.");
164 } 164 }
165 165
166 void setRange(int start, int rangeLength, List<$E> from, [int startFrom]) { 166 void setRange(int start, int end, Iterable<$E> iterable, [int skipCount]) {
167 throw new UnsupportedError("Cannot setRange on immutable List."); 167 throw new UnsupportedError("Cannot setRange on immutable List.");
168 } 168 }
169 169
170 void removeRange(int start, int rangeLength) { 170 void removeRange(int start, int rangeLength) {
171 throw new UnsupportedError("Cannot removeRange on immutable List."); 171 throw new UnsupportedError("Cannot removeRange on immutable List.");
172 } 172 }
173 173
174 void insertRange(int start, int rangeLength, [$E initialValue]) { 174 void insertRange(int start, int rangeLength, [$E initialValue]) {
175 throw new UnsupportedError("Cannot insertRange on immutable List."); 175 throw new UnsupportedError("Cannot insertRange on immutable List.");
176 } 176 }
(...skipping 10 matching lines...) Expand all
187 IterableMixinWorkaround.asMapList(this); 187 IterableMixinWorkaround.asMapList(this);
188 188
189 String toString() { 189 String toString() {
190 StringBuffer buffer = new StringBuffer('['); 190 StringBuffer buffer = new StringBuffer('[');
191 buffer.writeAll(this, ', '); 191 buffer.writeAll(this, ', ');
192 buffer.write(']'); 192 buffer.write(']');
193 return buffer.toString(); 193 return buffer.toString();
194 } 194 }
195 195
196 // -- end List<$E> mixins. 196 // -- end List<$E> mixins.
OLDNEW
« no previous file with comments | « tools/dom/templates/html/impl/impl_Node.darttemplate ('k') | utils/tests/string_encoding/benchmark_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698