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 StyleSheetListWrappingImplementation extends DOMWrapperBase implements Sty
leSheetList { | |
8 StyleSheetListWrappingImplementation._wrap(ptr) : super._wrap(ptr) {} | |
9 | |
10 int get length() { return _ptr.length; } | |
11 | |
12 StyleSheet operator[](int index) { | |
13 return LevelDom.wrapStyleSheet(_ptr[index]); | |
14 } | |
15 | |
16 void operator[]=(int index, StyleSheet value) { | |
17 _ptr[index] = LevelDom.unwrap(value); | |
18 } | |
19 | |
20 void add(StyleSheet value) { | |
21 throw new UnsupportedOperationException("Cannot add to immutable List."); | |
22 } | |
23 | |
24 void addLast(StyleSheet value) { | |
25 throw new UnsupportedOperationException("Cannot add to immutable List."); | |
26 } | |
27 | |
28 void addAll(Collection<StyleSheet> collection) { | |
29 throw new UnsupportedOperationException("Cannot add to immutable List."); | |
30 } | |
31 | |
32 void sort(int compare(StyleSheet a, StyleSheet 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(StyleSheet element, [int start = 0]) { | |
41 return Lists.indexOf(this, element, start, this.length); | |
42 } | |
43 | |
44 int lastIndexOf(StyleSheet 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 StyleSheet removeLast() { | |
54 throw new UnsupportedOperationException("Cannot removeLast on immutable List
."); | |
55 } | |
56 | |
57 StyleSheet last() { | |
58 return this[length - 1]; | |
59 } | |
60 | |
61 void forEach(void f(StyleSheet element)) { | |
62 _Collections.forEach(this, f); | |
63 } | |
64 | |
65 Collection map(f(StyleSheet element)) { | |
66 return _Collections.map(this, [], f); | |
67 } | |
68 | |
69 Collection<StyleSheet> filter(bool f(StyleSheet element)) { | |
70 return _Collections.filter(this, new List<StyleSheet>(), f); | |
71 } | |
72 | |
73 bool every(bool f(StyleSheet element)) { | |
74 return _Collections.every(this, f); | |
75 } | |
76 | |
77 bool some(bool f(StyleSheet element)) { | |
78 return _Collections.some(this, f); | |
79 } | |
80 | |
81 void setRange(int start, int length, List<StyleSheet> 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, [StyleSheet initialValue]) { | |
90 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); | |
91 } | |
92 | |
93 List<StyleSheet> getRange(int start, int length) { | |
94 throw new NotImplementedException(); | |
95 } | |
96 | |
97 bool isEmpty() { | |
98 return length == 0; | |
99 } | |
100 | |
101 Iterator<StyleSheet> iterator() { | |
102 return new _FixedSizeListIterator<StyleSheet>(this); | |
103 } | |
104 | |
105 StyleSheet item(int index) { | |
106 return LevelDom.wrapStyleSheet(_ptr.item(index)); | |
107 } | |
108 } | |
OLD | NEW |