Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Side by Side Diff: tools/dom/src/WrappedList.dart

Issue 13956006: Remove insertRange. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebuild DOM (unrelated CL) and update status files. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/html/element_test.dart ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 E removeLast() => _list.removeLast(); 109 E removeLast() => _list.removeLast();
110 110
111 List<E> sublist(int start, [int end]) => _list.sublist(start, end); 111 List<E> sublist(int start, [int end]) => _list.sublist(start, end);
112 112
113 Iterable<E> getRange(int start, int end) => _list.getRange(start, end); 113 Iterable<E> getRange(int start, int end) => _list.getRange(start, end);
114 114
115 void setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]) { 115 void setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]) {
116 _list.setRange(start, end, iterable, skipCount); 116 _list.setRange(start, end, iterable, skipCount);
117 } 117 }
118 118
119 void removeRange(int start, int length) { _list.removeRange(start, length); } 119 void removeRange(int start, int end) { _list.removeRange(start, end); }
120
121 void insertRange(int start, int length, [E fill]) {
122 _list.insertRange(start, length, fill);
123 }
124 120
125 Map<int, E> asMap() => _list.asMap(); 121 Map<int, E> asMap() => _list.asMap();
126 122
127 String toString() { 123 String toString() {
128 StringBuffer buffer = new StringBuffer('['); 124 StringBuffer buffer = new StringBuffer('[');
129 buffer.writeAll(this, ', '); 125 buffer.writeAll(this, ', ');
130 buffer.write(']'); 126 buffer.write(']');
131 return buffer.toString(); 127 return buffer.toString();
132 } 128 }
133 } 129 }
134 130
135 /** 131 /**
136 * Iterator wrapper for _WrappedList. 132 * Iterator wrapper for _WrappedList.
137 */ 133 */
138 class _WrappedIterator<E> implements Iterator<E> { 134 class _WrappedIterator<E> implements Iterator<E> {
139 Iterator _iterator; 135 Iterator _iterator;
140 136
141 _WrappedIterator(this._iterator); 137 _WrappedIterator(this._iterator);
142 138
143 bool moveNext() { 139 bool moveNext() {
144 return _iterator.moveNext(); 140 return _iterator.moveNext();
145 } 141 }
146 142
147 E get current => _iterator.current; 143 E get current => _iterator.current;
148 } 144 }
OLDNEW
« no previous file with comments | « tests/html/element_test.dart ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698