| 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 14 matching lines...) Expand all Loading... |
| 25 $endif | 25 $endif |
| 26 | 26 |
| 27 void forEach(void f($E element)) => IterableMixinWorkaround.forEach(this, f); | 27 void forEach(void f($E element)) => IterableMixinWorkaround.forEach(this, f); |
| 28 | 28 |
| 29 String join([String separator]) => | 29 String join([String separator]) => |
| 30 IterableMixinWorkaround.joinList(this, separator); | 30 IterableMixinWorkaround.joinList(this, separator); |
| 31 | 31 |
| 32 Iterable map(f($E element)) => | 32 Iterable map(f($E element)) => |
| 33 IterableMixinWorkaround.mapList(this, f); | 33 IterableMixinWorkaround.mapList(this, f); |
| 34 | 34 |
| 35 List mappedBy(f($E element)) => |
| 36 IterableMixinWorkaround.mappedByList(this, f); |
| 37 |
| 35 Iterable<$E> where(bool f($E element)) => | 38 Iterable<$E> where(bool f($E element)) => |
| 36 IterableMixinWorkaround.where(this, f); | 39 IterableMixinWorkaround.where(this, f); |
| 37 | 40 |
| 38 Iterable expand(Iterable f($E element)) => | 41 Iterable expand(Iterable f($E element)) => |
| 39 IterableMixinWorkaround.expand(this, f); | 42 IterableMixinWorkaround.expand(this, f); |
| 40 | 43 |
| 41 bool every(bool f($E element)) => IterableMixinWorkaround.every(this, f); | 44 bool every(bool f($E element)) => IterableMixinWorkaround.every(this, f); |
| 42 | 45 |
| 43 bool any(bool f($E element)) => IterableMixinWorkaround.any(this, f); | 46 bool any(bool f($E element)) => IterableMixinWorkaround.any(this, f); |
| 44 | 47 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 } | 182 } |
| 180 | 183 |
| 181 void insertRange(int start, int rangeLength, [$E initialValue]) { | 184 void insertRange(int start, int rangeLength, [$E initialValue]) { |
| 182 throw new UnsupportedError("Cannot insertRange on immutable List."); | 185 throw new UnsupportedError("Cannot insertRange on immutable List."); |
| 183 } | 186 } |
| 184 | 187 |
| 185 List<$E> getRange(int start, int rangeLength) => | 188 List<$E> getRange(int start, int rangeLength) => |
| 186 Lists.getRange(this, start, rangeLength, <$E>[]); | 189 Lists.getRange(this, start, rangeLength, <$E>[]); |
| 187 | 190 |
| 188 // -- end List<$E> mixins. | 191 // -- end List<$E> mixins. |
| OLD | NEW |