| 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 CanvasPixelArrayWrappingImplementation extends DOMWrapperBase implements C
anvasPixelArray { | 7 class CanvasPixelArrayWrappingImplementation extends DOMWrapperBase implements C
anvasPixelArray { |
| 8 CanvasPixelArrayWrappingImplementation._wrap(ptr) : super._wrap(ptr) {} | 8 CanvasPixelArrayWrappingImplementation._wrap(ptr) : super._wrap(ptr) {} |
| 9 | 9 |
| 10 int get length() { return _ptr.length; } | 10 int get length() { return _ptr.length; } |
| 11 | 11 |
| 12 int operator[](int index) { | 12 int operator[](int index) { |
| 13 return item(index); | 13 return _ptr[index]; |
| 14 } | 14 } |
| 15 | 15 |
| 16 void operator[]=(int index, int value) { | 16 void operator[]=(int index, int value) { |
| 17 throw new UnsupportedOperationException("Cannot assign element of immutable
List."); | 17 _ptr[index] = value; |
| 18 } | 18 } |
| 19 | 19 |
| 20 void add(int value) { | 20 void add(int value) { |
| 21 throw new UnsupportedOperationException("Cannot add to immutable List."); | 21 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 22 } | 22 } |
| 23 | 23 |
| 24 void addLast(int value) { | 24 void addLast(int value) { |
| 25 throw new UnsupportedOperationException("Cannot add to immutable List."); | 25 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 26 } | 26 } |
| 27 | 27 |
| 28 void addAll(Collection<int> collection) { | 28 void addAll(Collection<int> collection) { |
| 29 throw new UnsupportedOperationException("Cannot add to immutable List."); | 29 throw new UnsupportedOperationException("Cannot add to immutable List."); |
| 30 } | 30 } |
| 31 | 31 |
| 32 void sort(int compare(int a, int b)) { | 32 void sort(int compare(int a, int 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(int element, [int start = 0]) { | 40 int indexOf(int element, [int start = 0]) { |
| 41 return _Lists.indexOf(this, element, start, this.length); | 41 return _Lists.indexOf(this, element, start, this.length); |
| 42 } | 42 } |
| 43 | 43 |
| 44 int lastIndexOf(int element, [int start = null]) { | 44 int lastIndexOf(int element, [int start = null]) { |
| 45 if (start == null) start = length - 1; | 45 if (start === null) start = length - 1; |
| 46 return _Lists.lastIndexOf(this, element, start); | 46 return _Lists.lastIndexOf(this, element, start); |
| 47 } | 47 } |
| 48 | 48 |
| 49 int clear() { | 49 int clear() { |
| 50 throw new UnsupportedOperationException("Cannot clear immutable List."); | 50 throw new UnsupportedOperationException("Cannot clear immutable List."); |
| 51 } | 51 } |
| 52 | 52 |
| 53 int removeLast() { | 53 int removeLast() { |
| 54 throw new UnsupportedOperationException("Cannot removeLast on immutable List
."); | 54 throw new UnsupportedOperationException("Cannot removeLast on immutable List
."); |
| 55 } | 55 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 throw new NotImplementedException(); | 90 throw new NotImplementedException(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 bool isEmpty() { | 93 bool isEmpty() { |
| 94 return length == 0; | 94 return length == 0; |
| 95 } | 95 } |
| 96 | 96 |
| 97 Iterator<int> iterator() { | 97 Iterator<int> iterator() { |
| 98 return new _FixedSizeListIterator<int>(this); | 98 return new _FixedSizeListIterator<int>(this); |
| 99 } | 99 } |
| 100 | |
| 101 int item(int index) { | |
| 102 return _ptr.item(index); | |
| 103 } | |
| 104 } | 100 } |
| OLD | NEW |