| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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.core; | 5 part of dart.core; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * This class is the public interface of a set. A set is a collection | 8 * This class is the public interface of a set. A set is a collection |
| 9 * without duplicates. | 9 * without duplicates. |
| 10 */ | 10 */ |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * Removes [value] from the set. Returns true if [value] was | 31 * Removes [value] from the set. Returns true if [value] was |
| 32 * in the set. Returns false otherwise. The method has no effect | 32 * in the set. Returns false otherwise. The method has no effect |
| 33 * if [value] value was not in the set. | 33 * if [value] value was not in the set. |
| 34 */ | 34 */ |
| 35 bool remove(Object value); | 35 bool remove(Object value); |
| 36 | 36 |
| 37 /** | 37 /** |
| 38 * Returns true if [other] contains all the elements of this Set. | 38 * Returns true if [other] contains all the elements of this Set. |
| 39 * | |
| 40 * *Deprecated*. Use `other.containsAll(thisSet)` instead if [other] | |
| 41 * is a Set, and convert `other` to a Set if it isn't. | |
| 42 */ | 39 */ |
| 43 @deprecated | 40 bool isSubsetOf(Set<E> other); |
| 44 bool isSubsetOf(Iterable<E> other); | |
| 45 | 41 |
| 46 /** | 42 /** |
| 47 * Returns true if this Set contains all the elements of [other]. | 43 * Returns true if this Set contains all the elements of [other]. |
| 48 */ | 44 */ |
| 49 bool containsAll(Iterable<E> other); | 45 bool containsAll(Set<E> other); |
| 50 | 46 |
| 51 /** | 47 /** |
| 52 * Returns a new set which is the intersection between this set and [other]. | 48 * Returns a new set which is the intersection between this set and [other]. |
| 53 */ | 49 */ |
| 54 Set<E> intersection(Set<E> other); | 50 Set<E> intersection(Set<E> other); |
| 55 | 51 |
| 56 /** | 52 /** |
| 57 * Returns a new set which contains all the elements of this set and [other]. | 53 * Returns a new set which contains all the elements of this set and [other]. |
| 58 */ | 54 */ |
| 59 Set<E> union(Set<E> other); | 55 Set<E> union(Set<E> other); |
| 60 | 56 |
| 61 /** | 57 /** |
| 62 * Returns a new set with the the elements of this that are not in [other]. | 58 * Returns a new set with the the elements of this that are not in [other]. |
| 63 */ | 59 */ |
| 64 Set<E> difference(Set<E> other); | 60 Set<E> difference(Set<E> other); |
| 65 | 61 |
| 66 /** | 62 /** |
| 67 * Removes all elements in the set. | 63 * Removes all elements in the set. |
| 68 */ | 64 */ |
| 69 void clear(); | 65 void clear(); |
| 70 } | 66 } |
| OLD | NEW |