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

Unified Diff: sdk/lib/collection/collections.dart

Issue 12838002: Deprecate Set.isSubsetOf, make Set.containsAll accept iterable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated test expectations. Created 7 years, 9 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 | « no previous file | sdk/lib/collection/hash_set.dart » ('j') | sdk/lib/html/dartium/html_dartium.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/collection/collections.dart
diff --git a/sdk/lib/collection/collections.dart b/sdk/lib/collection/collections.dart
index 4cf7daf326a7993183ad17b377a0f3ce0d5f2f1e..5d8431743f585b374bf0a0a76430ca4d10fb6fdb 100644
--- a/sdk/lib/collection/collections.dart
+++ b/sdk/lib/collection/collections.dart
@@ -382,15 +382,13 @@ class IterableMixinWorkaround {
return new ListMapView(l);
}
- static bool isSubsetOfSet(Set set, Set other) {
- if (set.length > other.length) return false;
- for (var element in set) {
- if (!other.contains(element)) return false;
+ static bool setContainsAll(Set set, Iterable other) {
+ for (var element in other) {
+ if (!set.contains(element)) return false;
}
return true;
}
-
static Set setIntersection(Set set, Set other, Set result) {
Set smaller;
Set larger;
« no previous file with comments | « no previous file | sdk/lib/collection/hash_set.dart » ('j') | sdk/lib/html/dartium/html_dartium.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698