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

Unified Diff: runtime/lib/byte_array.dart

Issue 11169004: Add "contains" method to Collection. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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: runtime/lib/byte_array.dart
diff --git a/runtime/lib/byte_array.dart b/runtime/lib/byte_array.dart
index feadf0e90a7024149f784b45fd33613a80d91da2..90d4045e9b6ce224716548045986d093dfbdf683 100644
--- a/runtime/lib/byte_array.dart
+++ b/runtime/lib/byte_array.dart
@@ -123,6 +123,8 @@ abstract class _ByteArrayBase {
// Methods implementing the Collection interface.
+ bool contains(element) => Collections.contains(this, element);
+
void forEach(void f(element)) {
var len = this.length;
for (var i = 0; i < len; i++) {

Powered by Google App Engine
This is Rietveld 408576698