| OLD | NEW |
| 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 MediaLis
t { | 7 class MediaListWrappingImplementation extends DOMWrapperBase implements MediaLis
t { |
| 8 MediaListWrappingImplementation._wrap(ptr) : super._wrap(ptr) {} | 8 MediaListWrappingImplementation._wrap(ptr) : super._wrap(ptr) {} |
| 9 | 9 |
| 10 int get length() { return _ptr.length; } | 10 int get length() { return _ptr.length; } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 } | 34 } |
| 35 | 35 |
| 36 void sort(int compare(String a, String b)) { | 36 void sort(int compare(String a, String b)) { |
| 37 throw new UnsupportedOperationException("Cannot sort immutable List."); | 37 throw new UnsupportedOperationException("Cannot sort immutable List."); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) { | 40 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) { |
| 41 throw new UnsupportedOperationException("This object is immutable."); | 41 throw new UnsupportedOperationException("This object is immutable."); |
| 42 } | 42 } |
| 43 | 43 |
| 44 int indexOf(String element, int startIndex) { | 44 int indexOf(String element, [int start = 0]) { |
| 45 return _Lists.indexOf(this, element, startIndex, this.length); | 45 return _Lists.indexOf(this, element, start, this.length); |
| 46 } | 46 } |
| 47 | 47 |
| 48 int lastIndexOf(String element, int startIndex) { | 48 int lastIndexOf(String element, [int start = null]) { |
| 49 return _Lists.lastIndexOf(this, element, startIndex); | 49 if (start === null) start = length - 1; |
| 50 return _Lists.lastIndexOf(this, element, start); |
| 50 } | 51 } |
| 51 | 52 |
| 52 int clear() { | 53 int clear() { |
| 53 throw new UnsupportedOperationException("Cannot clear immutable List."); | 54 throw new UnsupportedOperationException("Cannot clear immutable List."); |
| 54 } | 55 } |
| 55 | 56 |
| 56 String removeLast() { | 57 String removeLast() { |
| 57 throw new UnsupportedOperationException("Cannot removeLast on immutable List
."); | 58 throw new UnsupportedOperationException("Cannot removeLast on immutable List
."); |
| 58 } | 59 } |
| 59 | 60 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 109 |
| 109 void deleteMedium(String oldMedium) { | 110 void deleteMedium(String oldMedium) { |
| 110 _ptr.deleteMedium(oldMedium); | 111 _ptr.deleteMedium(oldMedium); |
| 111 return; | 112 return; |
| 112 } | 113 } |
| 113 | 114 |
| 114 String item(int index) { | 115 String item(int index) { |
| 115 return _ptr.item(index); | 116 return _ptr.item(index); |
| 116 } | 117 } |
| 117 } | 118 } |
| OLD | NEW |