| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 } | 148 } |
| 149 | 149 |
| 150 $E removeLast() { | 150 $E removeLast() { |
| 151 throw new UnsupportedError("Cannot remove from immutable List."); | 151 throw new UnsupportedError("Cannot remove from immutable List."); |
| 152 } | 152 } |
| 153 | 153 |
| 154 void remove(Object object) { | 154 void remove(Object object) { |
| 155 throw new UnsupportedError("Cannot remove from immutable List."); | 155 throw new UnsupportedError("Cannot remove from immutable List."); |
| 156 } | 156 } |
| 157 | 157 |
| 158 void removeAll(Iterable elements) { | |
| 159 throw new UnsupportedError("Cannot remove from immutable List."); | |
| 160 } | |
| 161 | |
| 162 void retainAll(Iterable elements) { | |
| 163 throw new UnsupportedError("Cannot remove from immutable List."); | |
| 164 } | |
| 165 | |
| 166 void removeWhere(bool test($E element)) { | 158 void removeWhere(bool test($E element)) { |
| 167 throw new UnsupportedError("Cannot remove from immutable List."); | 159 throw new UnsupportedError("Cannot remove from immutable List."); |
| 168 } | 160 } |
| 169 | 161 |
| 170 void retainWhere(bool test($E element)) { | 162 void retainWhere(bool test($E element)) { |
| 171 throw new UnsupportedError("Cannot remove from immutable List."); | 163 throw new UnsupportedError("Cannot remove from immutable List."); |
| 172 } | 164 } |
| 173 | 165 |
| 174 void setRange(int start, int rangeLength, List<$E> from, [int startFrom]) { | 166 void setRange(int start, int rangeLength, List<$E> from, [int startFrom]) { |
| 175 throw new UnsupportedError("Cannot setRange on immutable List."); | 167 throw new UnsupportedError("Cannot setRange on immutable List."); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 195 IterableMixinWorkaround.asMapList(this); | 187 IterableMixinWorkaround.asMapList(this); |
| 196 | 188 |
| 197 String toString() { | 189 String toString() { |
| 198 StringBuffer buffer = new StringBuffer('['); | 190 StringBuffer buffer = new StringBuffer('['); |
| 199 buffer.writeAll(this, ', '); | 191 buffer.writeAll(this, ', '); |
| 200 buffer.write(']'); | 192 buffer.write(']'); |
| 201 return buffer.toString(); | 193 return buffer.toString(); |
| 202 } | 194 } |
| 203 | 195 |
| 204 // -- end List<$E> mixins. | 196 // -- end List<$E> mixins. |
| OLD | NEW |