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

Unified Diff: sdk/lib/html/html_common/css_class_set.dart

Issue 26832002: Add Set.lookup method to get the instance in the set. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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/html/dartium/html_dartium.dart ('k') | tests/corelib/hash_set_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/html_common/css_class_set.dart
diff --git a/sdk/lib/html/html_common/css_class_set.dart b/sdk/lib/html/html_common/css_class_set.dart
index dddf69f00accf9dc00569057a694bb0ed51b7c6d..89e2aeb6ed36341aab05d8b09d38af28b38de6a5 100644
--- a/sdk/lib/html/html_common/css_class_set.dart
+++ b/sdk/lib/html/html_common/css_class_set.dart
@@ -83,6 +83,9 @@ abstract class CssClassSetImpl implements CssClassSet {
*/
bool contains(String value) => readClasses().contains(value);
+ /** Lookup from the Set interface. Not interesting for a String set. */
+ E lookup(String value) => contains(value) ? value : null;
+
/**
* Add the class [value] to element.
*
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tests/corelib/hash_set_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698