| Index: sdk/lib/collection/hash_set.dart
|
| diff --git a/sdk/lib/collection/hash_set.dart b/sdk/lib/collection/hash_set.dart
|
| index 04516fc02d7a759ebd3fca97ca8092b70c02cde2..8658733b67f9cc1839c0952741ce94d0f02893dd 100644
|
| --- a/sdk/lib/collection/hash_set.dart
|
| +++ b/sdk/lib/collection/hash_set.dart
|
| @@ -51,6 +51,16 @@ abstract class _HashSetBase<E> extends Collection<E> implements Set<E> {
|
| return result;
|
| }
|
|
|
| + void retainAll(Iterable objectsToRetain) {
|
| + Set retainSet;
|
| + if (objectsToRetain is Set) {
|
| + retainSet = objectsToRetain;
|
| + } else {
|
| + retainSet = objectsToRetain.toSet();
|
| + }
|
| + retainWhere(retainSet.contains);
|
| + }
|
| +
|
| String toString() => Collections.collectionToString(this);
|
| }
|
|
|
| @@ -79,16 +89,6 @@ class HashSet<E> extends _HashSetBase<E> {
|
|
|
| external void removeAll(Iterable objectsToRemove);
|
|
|
| - void retainAll(Iterable objectsToRetain) {
|
| - Set retainSet;
|
| - if (objectsToRetain is Set) {
|
| - retainSet = objectsToRetain;
|
| - } else {
|
| - retainSet = objectsToRetain.toSet();
|
| - }
|
| - retainWhere(retainSet.contains);
|
| - }
|
| -
|
| external void removeWhere(bool test(E element));
|
|
|
| external void retainWhere(bool test(E element));
|
|
|