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

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

Issue 14246008: Allow Object when doing lookups. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Forgot to upload before committing Created 7 years, 5 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
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 19 matching lines...) Expand all
30 // List APIs 30 // List APIs
31 31
32 E operator [](int index) => _list[index]; 32 E operator [](int index) => _list[index];
33 33
34 void operator []=(int index, E value) { _list[index] = value; } 34 void operator []=(int index, E value) { _list[index] = value; }
35 35
36 void set length(int newLength) { _list.length = newLength; } 36 void set length(int newLength) { _list.length = newLength; }
37 37
38 void sort([int compare(E a, E b)]) { _list.sort(compare); } 38 void sort([int compare(E a, E b)]) { _list.sort(compare); }
39 39
40 int indexOf(E element, [int start = 0]) => _list.indexOf(element, start); 40 int indexOf(Object element, [int start = 0]) => _list.indexOf(element, start);
41 41
42 int lastIndexOf(E element, [int start]) => _list.lastIndexOf(element, start); 42 int lastIndexOf(Object element, [int start]) => _list.lastIndexOf(element, sta rt);
43 43
44 void insert(int index, E element) => _list.insert(index, element); 44 void insert(int index, E element) => _list.insert(index, element);
45 45
46 E removeAt(int index) => _list.removeAt(index); 46 E removeAt(int index) => _list.removeAt(index);
47 47
48 void setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]) { 48 void setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]) {
49 _list.setRange(start, end, iterable, skipCount); 49 _list.setRange(start, end, iterable, skipCount);
50 } 50 }
51 51
52 void removeRange(int start, int end) { _list.removeRange(start, end); } 52 void removeRange(int start, int end) { _list.removeRange(start, end); }
(...skipping 14 matching lines...) Expand all
67 Iterator _iterator; 67 Iterator _iterator;
68 68
69 _WrappedIterator(this._iterator); 69 _WrappedIterator(this._iterator);
70 70
71 bool moveNext() { 71 bool moveNext() {
72 return _iterator.moveNext(); 72 return _iterator.moveNext();
73 } 73 }
74 74
75 E get current => _iterator.current; 75 E get current => _iterator.current;
76 } 76 }
OLDNEW
« no previous file with comments | « tests/lib/async/stream_last_where_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