| Index: sdk/lib/collection/hash_set.dart
|
| diff --git a/sdk/lib/collection/hash_set.dart b/sdk/lib/collection/hash_set.dart
|
| index ff95b4306541a488d0bb5daf90f5df34278f0aa6..359c1a4c434fa6673a0d250fc7fb4b59f71c6ce1 100644
|
| --- a/sdk/lib/collection/hash_set.dart
|
| +++ b/sdk/lib/collection/hash_set.dart
|
| @@ -5,59 +5,7 @@
|
| part of dart.collection;
|
|
|
| /** Common parts of [HashSet] and [LinkedHashSet] implementations. */
|
| -abstract class _HashSetBase<E> extends IterableBase<E> implements Set<E> {
|
| -
|
| - // Set.
|
| - bool containsAll(Iterable<Object> other) {
|
| - for (Object object in other) {
|
| - if (!this.contains(object)) return false;
|
| - }
|
| - return true;
|
| - }
|
| -
|
| - /** Create a new Set of the same type as this. */
|
| - HashSet<E> _newSet();
|
| -
|
| - Set<E> intersection(Set<Object> other) {
|
| - Set<E> result = _newSet();
|
| - for (var element in this) {
|
| - if (other.contains(element)) result.add(element);
|
| - }
|
| - return result;
|
| - }
|
| -
|
| - Set<E> union(Set<E> other) {
|
| - return _newSet()..addAll(this)..addAll(other);
|
| - }
|
| -
|
| - Set<E> difference(Set<E> other) {
|
| - HashSet<E> result = _newSet();
|
| - for (E element in this) {
|
| - if (!other.contains(element)) result.add(element);
|
| - }
|
| - return result;
|
| - }
|
| -
|
| - void _retainAll(Iterable objectsToRetain, bool isValidKey(Object o)) {
|
| - // TODO(lrn): Consider optimizing table based versions by
|
| - // building a new table of the entries to retain.
|
| - Set retainSet = _newSet();
|
| - for (Object o in objectsToRetain) {
|
| - if (isValidKey(o)) {
|
| - retainSet.add(o);
|
| - }
|
| - }
|
| - retainWhere(retainSet.contains);
|
| - }
|
| -
|
| - List<E> toList({bool growable: true}) {
|
| - List<E> result = growable ? (new List<E>()..length = this.length)
|
| - : new List<E>(this.length);
|
| - int i = 0;
|
| - for (E element in this) result[i++] = element;
|
| - return result;
|
| - }
|
| -
|
| +abstract class _HashSetBase<E> extends SetBase<E> {
|
| Set<E> toSet() => _newSet()..addAll(this);
|
|
|
| String toString() => IterableMixinWorkaround.toStringIterable(this, '{', '}');
|
|
|