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

Unified Diff: tools/dom/src/CssClassSet.dart

Issue 11817059: Fixes for a number of dart analyzer issues in dart:html. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Syncing to latest. Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/svg/dartium/svg_dartium.dart ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/CssClassSet.dart
diff --git a/tools/dom/src/CssClassSet.dart b/tools/dom/src/CssClassSet.dart
index ccb6d90ee1a6aedb3d848b4c83f2e82b246e5658..b6cbb9abee34f8929bae1ae19fab2d6d7d302925 100644
--- a/tools/dom/src/CssClassSet.dart
+++ b/tools/dom/src/CssClassSet.dart
@@ -96,6 +96,29 @@ abstract class CssClassSet implements Set<String> {
Set<String> intersection(Collection<String> other) =>
readClasses().intersection(other);
+ String get first => readClasses().first;
+ String get last => readClasses().last;
+ String get single => readClasses().single;
+ List<String> toList() => readClasses().toList();
+ Set<String> toSet() => readClasses().toSet();
+ String min([int compare(String a, String b)]) =>
+ readClasses().min(compare);
+ String max([int compare(String a, String b)]) =>
+ readClasses().max(compare);
+ Iterable<String> take(int n) => readClasses().take(n);
+ Iterable<String> takeWhile(bool test(String value)) =>
+ readClasses().takeWhile(test);
+ Iterable<String> skip(int n) => readClasses().skip(n);
+ Iterable<String> skipWhile(bool test(String value)) =>
+ readClasses().skipWhile(test);
+ String firstMatching(bool test(String value), { String orElse() }) =>
+ readClasses().firstMatching(test, orElse: orElse);
+ String lastMatching(bool test(String value), {String orElse()}) =>
+ readClasses().lastMatching(test, orElse: orElse);
+ String singleMatching(bool test(String value)) =>
+ readClasses().singleMatching(test);
+ String elementAt(int index) => readClasses().elementAt(index);
+
void clear() {
_modify((s) => s.clear());
}
« no previous file with comments | « sdk/lib/svg/dartium/svg_dartium.dart ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698