OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 dart.dom.html; | 5 part of dart.dom.html; |
6 | 6 |
7 /** | 7 /** |
8 * A list which just wraps another list, for either intercepting list calls or | 8 * A list which just wraps another list, for either intercepting list calls or |
9 * retyping the list (for example, from List<A> to List<B> where B extends A). | 9 * retyping the list (for example, from List<A> to List<B> where B extends A). |
10 */ | 10 */ |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 E elementAt(int index) => _list.elementAt(index); | 73 E elementAt(int index) => _list.elementAt(index); |
74 | 74 |
75 // Collection APIs | 75 // Collection APIs |
76 | 76 |
77 void add(E element) { _list.add(element); } | 77 void add(E element) { _list.add(element); } |
78 | 78 |
79 void addAll(Iterable<E> elements) { _list.addAll(elements); } | 79 void addAll(Iterable<E> elements) { _list.addAll(elements); } |
80 | 80 |
81 void remove(Object element) { _list.remove(element); } | 81 void remove(Object element) { _list.remove(element); } |
82 | 82 |
83 void removeAll(Iterable elements) { _list.removeAll(elements); } | |
84 | |
85 void retainAll(Iterable elements) { _list.retainAll(elements); } | |
86 | |
87 void removeWhere(bool test(E element)) { _list.removeWhere(test); } | 83 void removeWhere(bool test(E element)) { _list.removeWhere(test); } |
88 | 84 |
89 void retainWhere(bool test(E element)) { _list.retainWhere(test); } | 85 void retainWhere(bool test(E element)) { _list.retainWhere(test); } |
90 | 86 |
91 void clear() { _list.clear(); } | 87 void clear() { _list.clear(); } |
92 | 88 |
93 // List APIs | 89 // List APIs |
94 | 90 |
95 E operator [](int index) => _list[index]; | 91 E operator [](int index) => _list[index]; |
96 | 92 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 Iterator _iterator; | 139 Iterator _iterator; |
144 | 140 |
145 _WrappedIterator(this._iterator); | 141 _WrappedIterator(this._iterator); |
146 | 142 |
147 bool moveNext() { | 143 bool moveNext() { |
148 return _iterator.moveNext(); | 144 return _iterator.moveNext(); |
149 } | 145 } |
150 | 146 |
151 E get current => _iterator.current; | 147 E get current => _iterator.current; |
152 } | 148 } |
OLD | NEW |