OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of html; | 5 part of html; |
6 | 6 |
7 // TODO(nweiz): when all implementations we target have the same name for the | 7 // TODO(nweiz): when all implementations we target have the same name for the |
8 // coreimpl implementation of List<E>, extend that rather than wrapping. | 8 // implementation of List<E>, extend that rather than wrapping. |
9 class _ListWrapper<E> implements List<E> { | 9 class _ListWrapper<E> implements List<E> { |
10 List _list; | 10 List _list; |
11 | 11 |
12 _ListWrapper(List this._list); | 12 _ListWrapper(List this._list); |
13 | 13 |
14 Iterator<E> iterator() => _list.iterator(); | 14 Iterator<E> iterator() => _list.iterator(); |
15 | 15 |
16 bool contains(E element) => _list.contains(element); | 16 bool contains(E element) => _list.contains(element); |
17 | 17 |
18 void forEach(void f(E element)) => _list.forEach(f); | 18 void forEach(void f(E element)) => _list.forEach(f); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 void insertRange(int start, int rangeLength, [Node initialValue]) { | 170 void insertRange(int start, int rangeLength, [Node initialValue]) { |
171 throw new UnsupportedError("Cannot insertRange on immutable List."); | 171 throw new UnsupportedError("Cannot insertRange on immutable List."); |
172 } | 172 } |
173 List<Node> getRange(int start, int rangeLength) => | 173 List<Node> getRange(int start, int rangeLength) => |
174 new _NodeListWrapper(_Lists.getRange(this, start, rangeLength, <Node>[])); | 174 new _NodeListWrapper(_Lists.getRange(this, start, rangeLength, <Node>[])); |
175 | 175 |
176 // -- end List<Node> mixins. | 176 // -- end List<Node> mixins. |
177 | 177 |
178 $!MEMBERS | 178 $!MEMBERS |
179 } | 179 } |
OLD | NEW |