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

Unified Diff: lib/html/templates/immutable_list_mixin.darttemplate

Issue 11169004: Add "contains" method to Collection. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use generator for html. Created 8 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
Index: lib/html/templates/immutable_list_mixin.darttemplate
diff --git a/lib/html/templates/immutable_list_mixin.darttemplate b/lib/html/templates/immutable_list_mixin.darttemplate
index ee45407aa0d2946acb947f411e6b12bcbbe6b224..1e6ebb5c112f3e0634fb4c23263b9b7896d72b95 100644
--- a/lib/html/templates/immutable_list_mixin.darttemplate
+++ b/lib/html/templates/immutable_list_mixin.darttemplate
@@ -24,6 +24,8 @@
throw const UnsupportedOperationException("Cannot add to immutable List.");
}
+ bool contains($E element) => _Collections.contains(this, element);
+
void forEach(void f($E element)) => _Collections.forEach(this, f);
Collection map(f($E element)) => _Collections.map(this, [], f);

Powered by Google App Engine
This is Rietveld 408576698