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

Side by Side Diff: client/dom/generated/src/wrapping/_MediaListWrappingImplementation.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 _MediaListWrappingImplementation extends DOMWrapperBase implements MediaLi st { 7 class _MediaListWrappingImplementation extends DOMWrapperBase implements MediaLi st {
8 _MediaListWrappingImplementation() : super() {} 8 _MediaListWrappingImplementation() : super() {}
9 9
10 static create__MediaListWrappingImplementation() native { 10 static create__MediaListWrappingImplementation() native {
(...skipping 30 matching lines...) Expand all
41 } 41 }
42 42
43 void sort(int compare(String a, String b)) { 43 void sort(int compare(String a, String b)) {
44 throw new UnsupportedOperationException("Cannot sort immutable List."); 44 throw new UnsupportedOperationException("Cannot sort immutable List.");
45 } 45 }
46 46
47 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) { 47 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
48 throw new UnsupportedOperationException("This object is immutable."); 48 throw new UnsupportedOperationException("This object is immutable.");
49 } 49 }
50 50
51 int indexOf(String element, int startIndex) { 51 int indexOf(String element, [int start = 0]) {
52 return _Lists.indexOf(this, element, startIndex, this.length); 52 return _Lists.indexOf(this, element, start, this.length);
53 } 53 }
54 54
55 int lastIndexOf(String element, int startIndex) { 55 int lastIndexOf(String element, [int start = null]) {
56 return _Lists.lastIndexOf(this, element, startIndex); 56 if (start === null) start = length - 1;
57 return _Lists.lastIndexOf(this, element, start);
57 } 58 }
58 59
59 int clear() { 60 int clear() {
60 throw new UnsupportedOperationException("Cannot clear immutable List."); 61 throw new UnsupportedOperationException("Cannot clear immutable List.");
61 } 62 }
62 63
63 String removeLast() { 64 String removeLast() {
64 throw new UnsupportedOperationException("Cannot removeLast on immutable List ."); 65 throw new UnsupportedOperationException("Cannot removeLast on immutable List .");
65 } 66 }
66 67
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 121 }
121 static void _deleteMedium(receiver, oldMedium) native; 122 static void _deleteMedium(receiver, oldMedium) native;
122 123
123 String item(int index) { 124 String item(int index) {
124 return _item(this, index); 125 return _item(this, index);
125 } 126 }
126 static String _item(receiver, index) native; 127 static String _item(receiver, index) native;
127 128
128 String get typeName() { return "MediaList"; } 129 String get typeName() { return "MediaList"; }
129 } 130 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698