Index: sdk/lib/collection/linked_hash_set.dart |
diff --git a/sdk/lib/collection/linked_hash_set.dart b/sdk/lib/collection/linked_hash_set.dart |
index 8a4d566130ce6b821fdda7af8dc53518ac83a215..f33ab54b89b51245f6c444dfeaf10d6698985b5b 100644 |
--- a/sdk/lib/collection/linked_hash_set.dart |
+++ b/sdk/lib/collection/linked_hash_set.dart |
@@ -4,7 +4,8 @@ |
part of dart.collection; |
-class LinkedHashSet<E> extends Collection<E> implements Set<E> { |
+class LinkedHashSet<E> extends Collection<E> with _SetMixin<E> |
+ implements Set<E> { |
static const int _INITIAL_CAPACITY = 8; |
_LinkedHashTable<E> _table; |
@@ -93,10 +94,6 @@ class LinkedHashSet<E> extends Collection<E> implements Set<E> { |
} |
} |
- void retainAll(Iterable objectsToRemove) { |
- IterableMixinWorkaround.retainAll(this, objectsToRemove); |
- } |
- |
void _filterWhere(bool test(E element), bool removeMatching) { |
int entrySize = _table._entrySize; |
int length = _table._table.length; |
@@ -127,36 +124,8 @@ class LinkedHashSet<E> extends Collection<E> implements Set<E> { |
_table._clear(); |
} |
- // Set. |
- bool isSubsetOf(Collection<E> other) { |
- // Deprecated, and using old signature. |
- Set otherSet; |
- if (other is Set) { |
- otherSet = other; |
- } else { |
- otherSet = other.toSet(); |
- } |
- return IterableMixinWorkaround.setContainsAll(otherSet, this); |
- } |
- |
- bool containsAll(Iterable<E> other) { |
- return IterableMixinWorkaround.setContainsAll(this, other); |
- } |
- |
- Set<E> intersection(Set<E> other) { |
- return IterableMixinWorkaround.setIntersection( |
- this, other, new LinkedHashSet<E>()); |
- } |
- |
- Set<E> union(Set<E> other) { |
- return IterableMixinWorkaround.setUnion( |
- this, other, new LinkedHashSet<E>()); |
- } |
- |
- Set<E> difference(Set<E> other) { |
- return IterableMixinWorkaround.setDifference( |
- this, other, new LinkedHashSet<E>()); |
- } |
+ // Set interface from _SetMixin<E>. |
+ Set<E> _newSet() => new LinkedHashSet<E>(); |
String toString() => Collections.collectionToString(this); |
} |