OLD | NEW |
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 Loading... |
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 Loading... |
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. |
OLD | NEW |