6 |
|
*/ |
7 |
|
|
8 |
|
package java.util; |
9 |
+ |
import java.util.*; // for javadoc (till 6280605 is fixed) |
10 |
|
|
11 |
|
/** |
12 |
|
* A {@link NavigableSet} implementation based on a {@link TreeMap}. |
192 |
|
|
193 |
|
/** |
194 |
|
* Returns <tt>true</tt> if this set contains the specified element. |
195 |
+ |
* More formally, returns <tt>true</tt> if and only if this set |
196 |
+ |
* contains an element <tt>e</tt> such that |
197 |
+ |
* <tt>(o==null ? e==null : o.equals(e))</tt>. |
198 |
|
* |
199 |
< |
* @param o the object to be checked for containment in this set |
199 |
> |
* @param o object to be checked for containment in this set |
200 |
|
* @return <tt>true</tt> if this set contains the specified element |
201 |
|
* @throws ClassCastException if the specified object cannot be compared |
202 |
|
* with the elements currently in the set |
210 |
|
|
211 |
|
/** |
212 |
|
* Adds the specified element to this set if it is not already present. |
213 |
+ |
* More formally, adds the specified element <tt>e</tt> to this set if |
214 |
+ |
* the set contains no element <tt>e2</tt> such that |
215 |
+ |
* <tt>(e==null ? e2==null : e.equals(e2))</tt>. |
216 |
+ |
* If this set already contains the element, the call leaves the set |
217 |
+ |
* unchanged and returns <tt>false</tt>. |
218 |
|
* |
219 |
|
* @param e element to be added to this set |
220 |
< |
* @return <tt>true</tt> if the set did not already contain the specified |
220 |
> |
* @return <tt>true</tt> if this set did not already contain the specified |
221 |
|
* element |
222 |
|
* @throws ClassCastException if the specified object cannot be compared |
223 |
< |
* with the elements currently in the set |
223 |
> |
* with the elements currently in this set |
224 |
|
* @throws NullPointerException if the specified element is null |
225 |
|
* and this set uses natural ordering, or its comparator |
226 |
|
* does not permit null elements |
231 |
|
|
232 |
|
/** |
233 |
|
* Removes the specified element from this set if it is present. |
234 |
+ |
* More formally, removes an element <tt>e</tt> such that |
235 |
+ |
* <tt>(o==null ? e==null : o.equals(e))</tt>, |
236 |
+ |
* if this set contains such an element. Returns <tt>true</tt> if |
237 |
+ |
* this set contained the element (or equivalently, if this set |
238 |
+ |
* changed as a result of the call). (This set will not contain the |
239 |
+ |
* element once the call returns.) |
240 |
|
* |
241 |
|
* @param o object to be removed from this set, if present |
242 |
< |
* @return <tt>true</tt> if the set contained the specified element |
242 |
> |
* @return <tt>true</tt> if this set contained the specified element |
243 |
|
* @throws ClassCastException if the specified object cannot be compared |
244 |
< |
* with the elements currently in the set |
244 |
> |
* with the elements currently in this set |
245 |
|
* @throws NullPointerException if the specified element is null |
246 |
|
* and this set uses natural ordering, or its comparator |
247 |
|
* does not permit null elements |