Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: sdk/lib/html/html_common/css_class_set.dart

Issue 14246008: Allow Object when doing lookups. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Forgot to upload before committing Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of html_common; 5 part of html_common;
6 6
7 abstract class CssClassSetImpl implements CssClassSet { 7 abstract class CssClassSetImpl implements CssClassSet {
8 8
9 String toString() { 9 String toString() {
10 return readClasses().join(' '); 10 return readClasses().join(' ');
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 String get single => readClasses().single; 167 String get single => readClasses().single;
168 List<String> toList({ bool growable: true }) => 168 List<String> toList({ bool growable: true }) =>
169 readClasses().toList(growable: growable); 169 readClasses().toList(growable: growable);
170 Set<String> toSet() => readClasses().toSet(); 170 Set<String> toSet() => readClasses().toSet();
171 Iterable<String> take(int n) => readClasses().take(n); 171 Iterable<String> take(int n) => readClasses().take(n);
172 Iterable<String> takeWhile(bool test(String value)) => 172 Iterable<String> takeWhile(bool test(String value)) =>
173 readClasses().takeWhile(test); 173 readClasses().takeWhile(test);
174 Iterable<String> skip(int n) => readClasses().skip(n); 174 Iterable<String> skip(int n) => readClasses().skip(n);
175 Iterable<String> skipWhile(bool test(String value)) => 175 Iterable<String> skipWhile(bool test(String value)) =>
176 readClasses().skipWhile(test); 176 readClasses().skipWhile(test);
177 String firstWhere(bool test(String value), { String orElse() }) => 177 dynamic firstWhere(bool test(String value), { Object orElse() }) =>
178 readClasses().firstWhere(test, orElse: orElse); 178 readClasses().firstWhere(test, orElse: orElse);
179 String lastWhere(bool test(String value), {String orElse()}) => 179 dynamic lastWhere(bool test(String value), { Object orElse()}) =>
180 readClasses().lastWhere(test, orElse: orElse); 180 readClasses().lastWhere(test, orElse: orElse);
181 String singleWhere(bool test(String value)) => 181 String singleWhere(bool test(String value)) =>
182 readClasses().singleWhere(test); 182 readClasses().singleWhere(test);
183 String elementAt(int index) => readClasses().elementAt(index); 183 String elementAt(int index) => readClasses().elementAt(index);
184 184
185 void clear() { 185 void clear() {
186 modify((s) => s.clear()); 186 modify((s) => s.clear());
187 } 187 }
188 // interface Set - END 188 // interface Set - END
189 189
(...skipping 19 matching lines...) Expand all
209 */ 209 */
210 Set<String> readClasses(); 210 Set<String> readClasses();
211 211
212 /** 212 /**
213 * Join all the elements of a set into one string and write 213 * Join all the elements of a set into one string and write
214 * back to the element. 214 * back to the element.
215 * This is intended to be overridden by specific implementations. 215 * This is intended to be overridden by specific implementations.
216 */ 216 */
217 void writeClasses(Set<String> s); 217 void writeClasses(Set<String> s);
218 } 218 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | sdk/lib/html/html_common/filtered_element_list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698