| 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 * A collection of objects in which each object can occur only once. | 8 * A collection of objects in which each object can occur only once. |
| 9 * | 9 * |
| 10 * That is, for each object of the element type, the object is either considered | 10 * That is, for each object of the element type, the object is either considered |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 * | 159 * |
| 160 * That is, the returned set contains all the elements of this [Set] that | 160 * That is, the returned set contains all the elements of this [Set] that |
| 161 * are not elements of [other] according to `other.contains`. | 161 * are not elements of [other] according to `other.contains`. |
| 162 */ | 162 */ |
| 163 Set<E> difference(Set<E> other); | 163 Set<E> difference(Set<E> other); |
| 164 | 164 |
| 165 /** | 165 /** |
| 166 * Removes all elements in the set. | 166 * Removes all elements in the set. |
| 167 */ | 167 */ |
| 168 void clear(); | 168 void clear(); |
| 169 |
| 170 /** |
| 171 * Create a set of the same type as this one, but with no elements. |
| 172 * |
| 173 * The new set has the same behavior as this set, |
| 174 * but starts out with no elements. |
| 175 * |
| 176 * This method should be equivalent to `toSet()..clear()`. |
| 177 */ |
| 178 Set<E> cloneEmpty(); |
| 179 |
| 180 /* Creates a [Set] with the same elements and behavior as this `Set`. |
| 181 * |
| 182 * The returned set behaves the same as this set |
| 183 * with regard to adding and removing elements. |
| 184 * It initially contains the same elements. |
| 185 * If this set specifies an ordering of the elements, |
| 186 * the returned set will have the same order. |
| 187 */ |
| 188 Set<E> toSet(); |
| 169 } | 189 } |
| OLD | NEW |