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

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

Issue 14173003: Remove Collection, Collections and clean up List/Set/Queue implementations of retain/remove. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « tools/dom/src/CssClassSet.dart ('k') | tools/dom/src/native_DOMImplementation.dart » ('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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « tools/dom/src/CssClassSet.dart ('k') | tools/dom/src/native_DOMImplementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698