--- jsr166/src/main/java/util/TreeSet.java 2005/05/17 04:10:23 1.12 +++ jsr166/src/main/java/util/TreeSet.java 2005/05/19 07:47:49 1.15 @@ -154,20 +154,18 @@ public class TreeSet } /** - * Returns an iterator over the elements in this set. The elements - * are returned in ascending order. + * Returns an iterator over the elements in this set in ascending order. * - * @return an iterator over the elements in this set + * @return an iterator over the elements in this set in ascending order */ public Iterator iterator() { return m.keySet().iterator(); } /** - * Returns an iterator over the elements in this set. The elements - * are returned in descending order. + * Returns an iterator over the elements in this set in descending order. * - * @return an iterator over the elements in this set + * @return an iterator over the elements in this set in descending order */ public Iterator descendingIterator() { return m.descendingKeySet().iterator(); @@ -198,9 +196,9 @@ public class TreeSet * @return true if this set contains the specified element * @throws ClassCastException if the specified object cannot be compared * with the elements currently in the set - * @throws NullPointerException if the specified element is null and - * this set uses natural ordering and is non-empty, or its - * comparator does not permit null elements + * @throws NullPointerException if the specified element is null + * and this set uses natural ordering, or its comparator + * does not permit null elements */ public boolean contains(Object o) { return m.containsKey(o); @@ -214,9 +212,9 @@ public class TreeSet * element * @throws ClassCastException if the specified object cannot be compared * with the elements currently in the set - * @throws NullPointerException if the specified element is null and - * this set uses natural ordering and is non-empty, or its - * comparator does not permit null elements + * @throws NullPointerException if the specified element is null + * and this set uses natural ordering, or its comparator + * does not permit null elements */ public boolean add(E e) { return m.put(e, PRESENT)==null; @@ -229,9 +227,9 @@ public class TreeSet * @return true if the set contained the specified element * @throws ClassCastException if the specified object cannot be compared * with the elements currently in the set - * @throws NullPointerException if the specified element is null and - * this set uses natural ordering and is non-empty, or its - * comparator does not permit null elements + * @throws NullPointerException if the specified element is null + * and this set uses natural ordering, or its comparator + * does not permit null elements */ public boolean remove(Object o) { return m.remove(o)==PRESENT; @@ -248,7 +246,7 @@ public class TreeSet /** * Adds all of the elements in the specified collection to this set. * - * @param c elements to be added + * @param c collection containing elements to be added to this set * @return true if this set changed as a result of the call * @throws ClassCastException if the elements provided cannot be compared * with the elements currently in the set @@ -376,9 +374,9 @@ public class TreeSet /** * @throws ClassCastException {@inheritDoc} - * @throws NullPointerException if the specified element is null and - * this set uses natural ordering and is non-empty, - * or its comparator does not permit null elements + * @throws NullPointerException if the specified element is null + * and this set uses natural ordering, or its comparator + * does not permit null elements */ public E lower(E e) { return m.lowerKey(e); @@ -386,9 +384,9 @@ public class TreeSet /** * @throws ClassCastException {@inheritDoc} - * @throws NullPointerException if the specified element is null and - * this set uses natural ordering and is non-empty, - * or its comparator does not permit null elements + * @throws NullPointerException if the specified element is null + * and this set uses natural ordering, or its comparator + * does not permit null elements */ public E floor(E e) { return m.floorKey(e); @@ -396,9 +394,9 @@ public class TreeSet /** * @throws ClassCastException {@inheritDoc} - * @throws NullPointerException if the specified element is null and - * this set uses natural ordering and is non-empty, - * or its comparator does not permit null elements + * @throws NullPointerException if the specified element is null + * and this set uses natural ordering, or its comparator + * does not permit null elements */ public E ceiling(E e) { return m.ceilingKey(e); @@ -406,9 +404,9 @@ public class TreeSet /** * @throws ClassCastException {@inheritDoc} - * @throws NullPointerException if the specified element is null and - * this set uses natural ordering and is non-empty, - * or its comparator does not permit null elements + * @throws NullPointerException if the specified element is null + * and this set uses natural ordering, or its comparator + * does not permit null elements */ public E higher(E e) { return m.higherKey(e);