| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 // WARNING: Do not edit - generated code. | |
| 6 | |
| 7 class _MediaListWrappingImplementation extends DOMWrapperBase implements MediaLi
st { | |
| 8 _MediaListWrappingImplementation() : super() {} | |
| 9 | |
| 10 static create__MediaListWrappingImplementation() native { | |
| 11 return new _MediaListWrappingImplementation(); | |
| 12 } | |
| 13 | |
| 14 int get length() { return _get_length(this); } | |
| 15 static int _get_length(var _this) native; | |
| 16 | |
| 17 String get mediaText() { return _get_mediaText(this); } | |
| 18 static String _get_mediaText(var _this) native; | |
| 19 | |
| 20 void set mediaText(String value) { _set_mediaText(this, value); } | |
| 21 static void _set_mediaText(var _this, String value) native; | |
| 22 | |
| 23 String operator[](int index) { return _index(this, index); } | |
| 24 static String _index(var _this, int index) native; | |
| 25 | |
| 26 void operator[]=(int index, String value) { | |
| 27 throw new UnsupportedOperationException("Cannot assign element of immutable
List."); | |
| 28 } | |
| 29 | |
| 30 void add(String value) { | |
| 31 throw new UnsupportedOperationException("Cannot add to immutable List."); | |
| 32 } | |
| 33 | |
| 34 void addLast(String value) { | |
| 35 throw new UnsupportedOperationException("Cannot add to immutable List."); | |
| 36 } | |
| 37 | |
| 38 void addAll(Collection<String> collection) { | |
| 39 throw new UnsupportedOperationException("Cannot add to immutable List."); | |
| 40 } | |
| 41 | |
| 42 void sort(int compare(String a, String b)) { | |
| 43 throw new UnsupportedOperationException("Cannot sort immutable List."); | |
| 44 } | |
| 45 | |
| 46 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) { | |
| 47 throw new UnsupportedOperationException("This object is immutable."); | |
| 48 } | |
| 49 | |
| 50 int indexOf(String element, [int start = 0]) { | |
| 51 return _Lists.indexOf(this, element, start, this.length); | |
| 52 } | |
| 53 | |
| 54 int lastIndexOf(String element, [int start = null]) { | |
| 55 if (start === null) start = length - 1; | |
| 56 return _Lists.lastIndexOf(this, element, start); | |
| 57 } | |
| 58 | |
| 59 int clear() { | |
| 60 throw new UnsupportedOperationException("Cannot clear immutable List."); | |
| 61 } | |
| 62 | |
| 63 String removeLast() { | |
| 64 throw new UnsupportedOperationException("Cannot removeLast on immutable List
."); | |
| 65 } | |
| 66 | |
| 67 String last() { | |
| 68 return this[length - 1]; | |
| 69 } | |
| 70 | |
| 71 void forEach(void f(String element)) { | |
| 72 _Collections.forEach(this, f); | |
| 73 } | |
| 74 | |
| 75 Collection map(f(String element)) { | |
| 76 return _Collections.map(this, [], f); | |
| 77 } | |
| 78 | |
| 79 Collection<String> filter(bool f(String element)) { | |
| 80 return _Collections.filter(this, new List<String>(), f); | |
| 81 } | |
| 82 | |
| 83 bool every(bool f(String element)) { | |
| 84 return _Collections.every(this, f); | |
| 85 } | |
| 86 | |
| 87 bool some(bool f(String element)) { | |
| 88 return _Collections.some(this, f); | |
| 89 } | |
| 90 | |
| 91 void setRange(int start, int length, List<String> from, [int startFrom]) { | |
| 92 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); | |
| 93 } | |
| 94 | |
| 95 void removeRange(int start, int length) { | |
| 96 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); | |
| 97 } | |
| 98 | |
| 99 void insertRange(int start, int length, [String initialValue]) { | |
| 100 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); | |
| 101 } | |
| 102 | |
| 103 List<String> getRange(int start, int length) { | |
| 104 throw new NotImplementedException(); | |
| 105 } | |
| 106 | |
| 107 bool isEmpty() { | |
| 108 return length == 0; | |
| 109 } | |
| 110 | |
| 111 Iterator<String> iterator() { | |
| 112 return new _FixedSizeListIterator<String>(this); | |
| 113 } | |
| 114 | |
| 115 void appendMedium(String newMedium) { | |
| 116 _appendMedium(this, newMedium); | |
| 117 return; | |
| 118 } | |
| 119 static void _appendMedium(receiver, newMedium) native; | |
| 120 | |
| 121 void deleteMedium(String oldMedium) { | |
| 122 _deleteMedium(this, oldMedium); | |
| 123 return; | |
| 124 } | |
| 125 static void _deleteMedium(receiver, oldMedium) native; | |
| 126 | |
| 127 String item(int index) { | |
| 128 return _item(this, index); | |
| 129 } | |
| 130 static String _item(receiver, index) native; | |
| 131 | |
| 132 String get typeName() { return "MediaList"; } | |
| 133 } | |
| OLD | NEW |