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 _Float32ArrayWrappingImplementation extends _ArrayBufferViewWrappingImplem
entation implements Float32Array { | |
8 _Float32ArrayWrappingImplementation() : super() {} | |
9 | |
10 static create__Float32ArrayWrappingImplementation() native { | |
11 return new _Float32ArrayWrappingImplementation(); | |
12 } | |
13 | |
14 int get length() { return _get_length(this); } | |
15 static int _get_length(var _this) native; | |
16 | |
17 num operator[](int index) { return _index(this, index); } | |
18 static num _index(var _this, int index) native; | |
19 | |
20 void operator[]=(int index, num value) { | |
21 return _set_index(this, index, value); | |
22 } | |
23 static _set_index(_this, index, value) native; | |
24 | |
25 void add(num value) { | |
26 throw new UnsupportedOperationException("Cannot add to immutable List."); | |
27 } | |
28 | |
29 void addLast(num value) { | |
30 throw new UnsupportedOperationException("Cannot add to immutable List."); | |
31 } | |
32 | |
33 void addAll(Collection<num> collection) { | |
34 throw new UnsupportedOperationException("Cannot add to immutable List."); | |
35 } | |
36 | |
37 void sort(int compare(num a, num b)) { | |
38 throw new UnsupportedOperationException("Cannot sort immutable List."); | |
39 } | |
40 | |
41 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) { | |
42 throw new UnsupportedOperationException("This object is immutable."); | |
43 } | |
44 | |
45 int indexOf(num element, [int start = 0]) { | |
46 return _Lists.indexOf(this, element, start, this.length); | |
47 } | |
48 | |
49 int lastIndexOf(num element, [int start = null]) { | |
50 if (start === null) start = length - 1; | |
51 return _Lists.lastIndexOf(this, element, start); | |
52 } | |
53 | |
54 int clear() { | |
55 throw new UnsupportedOperationException("Cannot clear immutable List."); | |
56 } | |
57 | |
58 num removeLast() { | |
59 throw new UnsupportedOperationException("Cannot removeLast on immutable List
."); | |
60 } | |
61 | |
62 num last() { | |
63 return this[length - 1]; | |
64 } | |
65 | |
66 void forEach(void f(num element)) { | |
67 _Collections.forEach(this, f); | |
68 } | |
69 | |
70 Collection map(f(num element)) { | |
71 return _Collections.map(this, [], f); | |
72 } | |
73 | |
74 Collection<num> filter(bool f(num element)) { | |
75 return _Collections.filter(this, new List<num>(), f); | |
76 } | |
77 | |
78 bool every(bool f(num element)) { | |
79 return _Collections.every(this, f); | |
80 } | |
81 | |
82 bool some(bool f(num element)) { | |
83 return _Collections.some(this, f); | |
84 } | |
85 | |
86 void setRange(int start, int length, List<num> from, [int startFrom]) { | |
87 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); | |
88 } | |
89 | |
90 void removeRange(int start, int length) { | |
91 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); | |
92 } | |
93 | |
94 void insertRange(int start, int length, [num initialValue]) { | |
95 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); | |
96 } | |
97 | |
98 List<num> getRange(int start, int length) { | |
99 throw new NotImplementedException(); | |
100 } | |
101 | |
102 bool isEmpty() { | |
103 return length == 0; | |
104 } | |
105 | |
106 Iterator<num> iterator() { | |
107 return new _FixedSizeListIterator<num>(this); | |
108 } | |
109 | |
110 void setElements(Object array, [int offset = null]) { | |
111 if (offset === null) { | |
112 _setElements(this, array); | |
113 return; | |
114 } else { | |
115 _setElements_2(this, array, offset); | |
116 return; | |
117 } | |
118 } | |
119 static void _setElements(receiver, array) native; | |
120 static void _setElements_2(receiver, array, offset) native; | |
121 | |
122 Float32Array subarray(int start, [int end = null]) { | |
123 if (end === null) { | |
124 return _subarray(this, start); | |
125 } else { | |
126 return _subarray_2(this, start, end); | |
127 } | |
128 } | |
129 static Float32Array _subarray(receiver, start) native; | |
130 static Float32Array _subarray_2(receiver, start, end) native; | |
131 | |
132 String get typeName() { return "Float32Array"; } | |
133 } | |
OLD | NEW |