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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 int lastIndexOf(E element, [int start]) => _list.lastIndexOf(element, start); | 107 int lastIndexOf(E element, [int start]) => _list.lastIndexOf(element, start); |
108 | 108 |
109 void insert(int index, E element) => _list.insert(index, element); | 109 void insert(int index, E element) => _list.insert(index, element); |
110 | 110 |
111 E removeAt(int index) => _list.removeAt(index); | 111 E removeAt(int index) => _list.removeAt(index); |
112 | 112 |
113 E removeLast() => _list.removeLast(); | 113 E removeLast() => _list.removeLast(); |
114 | 114 |
115 List<E> sublist(int start, [int end]) => _list.sublist(start, end); | 115 List<E> sublist(int start, [int end]) => _list.sublist(start, end); |
116 | 116 |
117 List<E> getRange(int start, int length) => sublist(start, start + length); | 117 Iterable<E> getRange(int start, int end) => _list.getRange(start, end); |
118 | 118 |
119 void setRange(int start, int length, List<E> from, [int startFrom]) { | 119 void setRange(int start, int length, List<E> from, [int startFrom]) { |
120 _list.setRange(start, length, from, startFrom); | 120 _list.setRange(start, length, from, startFrom); |
121 } | 121 } |
122 | 122 |
123 void removeRange(int start, int length) { _list.removeRange(start, length); } | 123 void removeRange(int start, int length) { _list.removeRange(start, length); } |
124 | 124 |
125 void insertRange(int start, int length, [E fill]) { | 125 void insertRange(int start, int length, [E fill]) { |
126 _list.insertRange(start, length, fill); | 126 _list.insertRange(start, length, fill); |
127 } | 127 } |
(...skipping 15 matching lines...) Expand all Loading... |
143 Iterator _iterator; | 143 Iterator _iterator; |
144 | 144 |
145 _WrappedIterator(this._iterator); | 145 _WrappedIterator(this._iterator); |
146 | 146 |
147 bool moveNext() { | 147 bool moveNext() { |
148 return _iterator.moveNext(); | 148 return _iterator.moveNext(); |
149 } | 149 } |
150 | 150 |
151 E get current => _iterator.current; | 151 E get current => _iterator.current; |
152 } | 152 } |
OLD | NEW |