@@ -56,11 +56,13 @@ abstract class CssClassSetImpl implements CssClassSet {
56
56
57
57
String join ([String separator = "" ]) => readClasses ().join (separator);
58
58
59
- Iterable map (f (String element)) => readClasses ().map (f);
59
+ Iterable /*<T>*/ map/*<T>*/ (/*=T*/ f (String e)) =>
60
+ readClasses ().map/*<T>*/ (f);
60
61
61
62
Iterable <String > where (bool f (String element)) => readClasses ().where (f);
62
63
63
- Iterable expand (Iterable f (String element)) => readClasses ().expand (f);
64
+ Iterable /*<T>*/ expand/*<T>*/ (Iterable /*<T>*/ f (String element)) =>
65
+ readClasses ().expand/*<T>*/ (f);
64
66
65
67
bool every (bool f (String element)) => readClasses ().every (f);
66
68
@@ -76,10 +78,11 @@ abstract class CssClassSetImpl implements CssClassSet {
76
78
return readClasses ().reduce (combine);
77
79
}
78
80
79
- dynamic fold ( dynamic initialValue,
80
- dynamic combine (dynamic previousValue, String element)) {
81
- return readClasses ().fold (initialValue, combine);
81
+ dynamic /*=T*/ fold/*<T>*/ ( var /*=T*/ initialValue,
82
+ dynamic /*=T*/ combine (var /*=T*/ previousValue, String element)) {
83
+ return readClasses ().fold/*<T>*/ (initialValue, combine);
82
84
}
85
+
83
86
// interface Collection - END
84
87
85
88
// interface Set - BEGIN
@@ -145,7 +148,7 @@ abstract class CssClassSetImpl implements CssClassSet {
145
148
* [removeClass] (http://api.jquery.com/removeClass/).
146
149
*/
147
150
void removeAll (Iterable <Object > iterable) {
148
- modify ((s) => s.removeAll (iterable. map (_validateToken) ));
151
+ modify ((s) => s.removeAll (iterable));
149
152
}
150
153
151
154
/**
@@ -183,7 +186,7 @@ abstract class CssClassSetImpl implements CssClassSet {
183
186
Set <String > union (Set <String > other) =>
184
187
readClasses ().union (other);
185
188
186
- Set <String > difference (Set <String > other) =>
189
+ Set <String > difference (Set <Object > other) =>
187
190
readClasses ().difference (other);
188
191
189
192
String get first => readClasses ().first;
@@ -221,7 +224,7 @@ abstract class CssClassSetImpl implements CssClassSet {
221
224
* After f returns, the modified set is written to the
222
225
* className property of this element.
223
226
*/
224
- modify ( f (Set <String > s)) {
227
+ modify (f (Set <String > s)) {
225
228
Set <String > s = readClasses ();
226
229
var ret = f (s);
227
230
writeClasses (s);
0 commit comments