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

Side by Side Diff: client/html/generated/src/wrapping/_TouchListWrappingImplementation.dart

Issue 8424012: Add optional arguments to our indexOf/lastIndexOf methods. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // WARNING: Do not edit - generated code. 5 // WARNING: Do not edit - generated code.
6 6
7 class TouchListWrappingImplementation extends DOMWrapperBase implements TouchLis t { 7 class TouchListWrappingImplementation extends DOMWrapperBase implements TouchLis t {
8 TouchListWrappingImplementation._wrap(ptr) : super._wrap(ptr) {} 8 TouchListWrappingImplementation._wrap(ptr) : super._wrap(ptr) {}
9 9
10 int get length() { return _ptr.length; } 10 int get length() { return _ptr.length; }
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 void sort(int compare(Touch a, Touch b)) { 32 void sort(int compare(Touch a, Touch b)) {
33 throw new UnsupportedOperationException("Cannot sort immutable List."); 33 throw new UnsupportedOperationException("Cannot sort immutable List.");
34 } 34 }
35 35
36 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) { 36 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
37 throw new UnsupportedOperationException("This object is immutable."); 37 throw new UnsupportedOperationException("This object is immutable.");
38 } 38 }
39 39
40 int indexOf(Touch element, int startIndex) { 40 int indexOf(Touch element, [int start = 0]) {
41 return _Lists.indexOf(this, element, startIndex, this.length); 41 return _Lists.indexOf(this, element, start, this.length);
42 } 42 }
43 43
44 int lastIndexOf(Touch element, int startIndex) { 44 int lastIndexOf(Touch element, [int start = null]) {
45 return _Lists.lastIndexOf(this, element, startIndex); 45 if (start === null) start = length - 1;
46 return _Lists.lastIndexOf(this, element, start);
46 } 47 }
47 48
48 int clear() { 49 int clear() {
49 throw new UnsupportedOperationException("Cannot clear immutable List."); 50 throw new UnsupportedOperationException("Cannot clear immutable List.");
50 } 51 }
51 52
52 Touch removeLast() { 53 Touch removeLast() {
53 throw new UnsupportedOperationException("Cannot removeLast on immutable List ."); 54 throw new UnsupportedOperationException("Cannot removeLast on immutable List .");
54 } 55 }
55 56
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 95 }
95 96
96 Iterator<Touch> iterator() { 97 Iterator<Touch> iterator() {
97 return new _FixedSizeListIterator<Touch>(this); 98 return new _FixedSizeListIterator<Touch>(this);
98 } 99 }
99 100
100 Touch item(int index) { 101 Touch item(int index) {
101 return LevelDom.wrapTouch(_ptr.item(index)); 102 return LevelDom.wrapTouch(_ptr.item(index));
102 } 103 }
103 } 104 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698