ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/TreeSet.java
(Generate patch)

Comparing jsr166/src/main/java/util/TreeSet.java (file contents):
Revision 1.15 by jsr166, Thu May 19 07:47:49 2005 UTC vs.
Revision 1.16 by jsr166, Sun Jun 19 23:01:12 2005 UTC

# Line 6 | Line 6
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}.
# Line 191 | Line 192 | public class TreeSet<E>
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&nbsp;?&nbsp;e==null&nbsp;:&nbsp;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
# Line 206 | Line 210 | public class TreeSet<E>
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&nbsp;?&nbsp;e2==null&nbsp;:&nbsp;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
# Line 222 | Line 231 | public class TreeSet<E>
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&nbsp;?&nbsp;e==null&nbsp;:&nbsp;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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines