| 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> 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); |
| 11 } | 11 } |
| 12 | 12 |
| 13 // From Collection<$E>: | 13 // From Collection<$E>: |
| 14 | 14 |
| 15 void add($E value) { | 15 void add($E value) { |
| 16 throw new UnsupportedError("Cannot add to immutable List."); | 16 throw new UnsupportedError("Cannot add to immutable List."); |
| 17 } | 17 } |
| 18 | 18 |
| 19 void addLast($E value) { | 19 void addLast($E value) { |
| 20 throw new UnsupportedError("Cannot add to immutable List."); | 20 throw new UnsupportedError("Cannot add to immutable List."); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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. |
| OLD | NEW |