| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of dart.collection; | 5 part of dart.collection; |
| 6 | 6 |
| 7 /** Common parts of [HashSet] and [LinkedHashSet] implementations. */ | 7 /** Common parts of [HashSet] and [LinkedHashSet] implementations. */ |
| 8 abstract class _HashSetBase<E> extends Iterable<E> implements Set<E> { | 8 abstract class _HashSetBase<E> extends IterableBase<E> implements Set<E> { |
| 9 // Set. | 9 // Set. |
| 10 bool containsAll(Iterable<E> other) { | 10 bool containsAll(Iterable<E> other) { |
| 11 for (E object in other) { | 11 for (E object in other) { |
| 12 if (!this.contains(object)) return false; | 12 if (!this.contains(object)) return false; |
| 13 } | 13 } |
| 14 return true; | 14 return true; |
| 15 } | 15 } |
| 16 | 16 |
| 17 /** Create a new Set of the same type as this. */ | 17 /** Create a new Set of the same type as this. */ |
| 18 Set _newSet(); | 18 Set _newSet(); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 external void removeWhere(bool test(E element)); | 84 external void removeWhere(bool test(E element)); |
| 85 | 85 |
| 86 external void retainWhere(bool test(E element)); | 86 external void retainWhere(bool test(E element)); |
| 87 | 87 |
| 88 external void clear(); | 88 external void clear(); |
| 89 | 89 |
| 90 // Set. | 90 // Set. |
| 91 Set<E> _newSet() => new HashSet<E>(); | 91 Set<E> _newSet() => new HashSet<E>(); |
| 92 } | 92 } |
| OLD | NEW |