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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 void addAll(Iterable<E> elements); | 68 void addAll(Iterable<E> elements); |
69 | 69 |
70 /** | 70 /** |
71 * Removes [value] from the set. Returns true if [value] was | 71 * Removes [value] from the set. Returns true if [value] was |
72 * in the set. Returns false otherwise. The method has no effect | 72 * in the set. Returns false otherwise. The method has no effect |
73 * if [value] value was not in the set. | 73 * if [value] value was not in the set. |
74 */ | 74 */ |
75 bool remove(Object value); | 75 bool remove(Object value); |
76 | 76 |
77 /** | 77 /** |
| 78 * If an object equal to [object] is in the set, return it. |
| 79 * |
| 80 * Checks if there is an object in the set that is equal to [object]. |
| 81 * If so, that object is returned, otherwise returns null. |
| 82 */ |
| 83 E lookup(Object object); |
| 84 |
| 85 /** |
78 * Removes each element of [elements] from this set. | 86 * Removes each element of [elements] from this set. |
79 */ | 87 */ |
80 void removeAll(Iterable<Object> elements); | 88 void removeAll(Iterable<Object> elements); |
81 | 89 |
82 /** | 90 /** |
83 * Removes all elements of this set that are not elements in [elements]. | 91 * Removes all elements of this set that are not elements in [elements]. |
84 */ | 92 */ |
85 void retainAll(Iterable<Object> elements); | 93 void retainAll(Iterable<Object> elements); |
86 | 94 |
87 /** | 95 /** |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 * That is, the returned set contains all the elements of this `Set` that | 129 * That is, the returned set contains all the elements of this `Set` that |
122 * are not elements of [other]. | 130 * are not elements of [other]. |
123 */ | 131 */ |
124 Set<E> difference(Set<E> other); | 132 Set<E> difference(Set<E> other); |
125 | 133 |
126 /** | 134 /** |
127 * Removes all elements in the set. | 135 * Removes all elements in the set. |
128 */ | 136 */ |
129 void clear(); | 137 void clear(); |
130 } | 138 } |
OLD | NEW |