| 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 TouchListWrappingImplementation extends DOMWrapperBase implements TouchLis
t { | |
| 8 TouchListWrappingImplementation._wrap(ptr) : super._wrap(ptr) {} | |
| 9 | |
| 10 int get length() { return _ptr.length; } | |
| 11 | |
| 12 Touch operator[](int index) { | |
| 13 return LevelDom.wrapTouch(_ptr[index]); | |
| 14 } | |
| 15 | |
| 16 void operator[]=(int index, Touch value) { | |
| 17 _ptr[index] = LevelDom.unwrap(value); | |
| 18 } | |
| 19 | |
| 20 void add(Touch value) { | |
| 21 throw new UnsupportedOperationException("Cannot add to immutable List."); | |
| 22 } | |
| 23 | |
| 24 void addLast(Touch value) { | |
| 25 throw new UnsupportedOperationException("Cannot add to immutable List."); | |
| 26 } | |
| 27 | |
| 28 void addAll(Collection<Touch> collection) { | |
| 29 throw new UnsupportedOperationException("Cannot add to immutable List."); | |
| 30 } | |
| 31 | |
| 32 void sort(int compare(Touch a, Touch b)) { | |
| 33 throw new UnsupportedOperationException("Cannot sort immutable List."); | |
| 34 } | |
| 35 | |
| 36 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) { | |
| 37 throw new UnsupportedOperationException("This object is immutable."); | |
| 38 } | |
| 39 | |
| 40 int indexOf(Touch element, [int start = 0]) { | |
| 41 return Lists.indexOf(this, element, start, this.length); | |
| 42 } | |
| 43 | |
| 44 int lastIndexOf(Touch element, [int start = null]) { | |
| 45 if (start === null) start = length - 1; | |
| 46 return Lists.lastIndexOf(this, element, start); | |
| 47 } | |
| 48 | |
| 49 int clear() { | |
| 50 throw new UnsupportedOperationException("Cannot clear immutable List."); | |
| 51 } | |
| 52 | |
| 53 Touch removeLast() { | |
| 54 throw new UnsupportedOperationException("Cannot removeLast on immutable List
."); | |
| 55 } | |
| 56 | |
| 57 Touch last() { | |
| 58 return this[length - 1]; | |
| 59 } | |
| 60 | |
| 61 void forEach(void f(Touch element)) { | |
| 62 _Collections.forEach(this, f); | |
| 63 } | |
| 64 | |
| 65 Collection map(f(Touch element)) { | |
| 66 return _Collections.map(this, [], f); | |
| 67 } | |
| 68 | |
| 69 Collection<Touch> filter(bool f(Touch element)) { | |
| 70 return _Collections.filter(this, new List<Touch>(), f); | |
| 71 } | |
| 72 | |
| 73 bool every(bool f(Touch element)) { | |
| 74 return _Collections.every(this, f); | |
| 75 } | |
| 76 | |
| 77 bool some(bool f(Touch element)) { | |
| 78 return _Collections.some(this, f); | |
| 79 } | |
| 80 | |
| 81 void setRange(int start, int length, List<Touch> from, [int startFrom]) { | |
| 82 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); | |
| 83 } | |
| 84 | |
| 85 void removeRange(int start, int length) { | |
| 86 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); | |
| 87 } | |
| 88 | |
| 89 void insertRange(int start, int length, [Touch initialValue]) { | |
| 90 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); | |
| 91 } | |
| 92 | |
| 93 List<Touch> getRange(int start, int length) { | |
| 94 throw new NotImplementedException(); | |
| 95 } | |
| 96 | |
| 97 bool isEmpty() { | |
| 98 return length == 0; | |
| 99 } | |
| 100 | |
| 101 Iterator<Touch> iterator() { | |
| 102 return new _FixedSizeListIterator<Touch>(this); | |
| 103 } | |
| 104 | |
| 105 Touch item(int index) { | |
| 106 return LevelDom.wrapTouch(_ptr.item(index)); | |
| 107 } | |
| 108 } | |
| OLD | NEW |