--- jsr166/src/main/java/util/TreeSet.java 2005/03/29 15:00:48 1.4 +++ jsr166/src/main/java/util/TreeSet.java 2005/05/03 02:52:07 1.10 @@ -1,11 +1,11 @@ /* * %W% %E% * - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ -package java.util; +package java.util; /** * This class implements the Set interface, backed by a @@ -53,9 +53,9 @@ package java.util; * throw ConcurrentModificationException on a best-effort basis. * Therefore, it would be wrong to write a program that depended on this * exception for its correctness: the fail-fast behavior of iterators - * should be used only to detect bugs.

+ * should be used only to detect bugs. * - * This class is a member of the + *

This class is a member of the * * Java Collections Framework. * @@ -210,18 +210,18 @@ public class TreeSet /** * Adds the specified element to this set if it is not already present. * - * @param o element to be added to this set. + * @param e element to be added to this set. * @return true if the set did not already contain the specified * element. * * @throws ClassCastException if the specified object cannot be compared * with the elements currently in the set. - * @throws NullPointerException if o is null and this map + * @throws NullPointerException if e is null and this map * uses natural ordering and is non-empty, or its comparator does * not tolerate null keys. */ - public boolean add(E o) { - return m.put(o, PRESENT)==null; + public boolean add(E e) { + return m.put(e, PRESENT)==null; } /** @@ -265,9 +265,9 @@ public class TreeSet if (m.size()==0 && c.size() > 0 && c instanceof SortedSet && m instanceof TreeMap) { - SortedSet> set = (SortedSet>) (SortedSet) c; + SortedSet set = (SortedSet) c; TreeMap map = (TreeMap) m; - Comparator cc = (Comparator) set.comparator(); + Comparator cc = (Comparator) set.comparator(); Comparator mc = map.comparator(); if (cc==mc || (cc != null && cc.equals(mc))) { map.addAllForTreeSet(set, PRESENT); @@ -299,7 +299,7 @@ public class TreeSet * For example, suppose that s is a navigable set of * strings. The following idiom obtains a view containing all of * the strings in s from low to high, - * inclusive: + * inclusive: *

 NavigableSet sub = s.navigableSubSet(low, high+"\0");
      * 
* @@ -349,7 +349,7 @@ public class TreeSet * bounded by successor(highEndpoint). For example, * suppose that s is a navigable set of strings. The * following idiom obtains a view containing all of the strings in - * s that are less than or equal to high: + * s that are less than or equal to high: *
 NavigableSet head = s.navigableHeadSet(high+"\0");
* * @param toElement high endpoint (exclusive) of the headSet. @@ -442,7 +442,7 @@ public class TreeSet * @throws ClassCastException if toElement is not compatible * with this set's comparator (or, if the set has no comparator, * if toElement does not implement Comparable). - * @throws IllegalArgumentException if this set is itself a subSet, + * @throws IllegalArgumentException if this set is itself a subset, * and toElement is not within the * specified range of the subset. * @throws NullPointerException if toElement is null and @@ -510,69 +510,69 @@ public class TreeSet /** * Returns an element greater than or equal to the given element, or * null if there is no such element. - * - * @param o the value to match + * + * @param e the value to match * @return an element greater than or equal to given element, or * null if there is no such element. - * @throws ClassCastException if o cannot be compared with the elements + * @throws ClassCastException if e cannot be compared with the elements * currently in the set. - * @throws NullPointerException if o is null and this map + * @throws NullPointerException if e is null and this map * uses natural ordering and is non-empty, or its comparator does * not tolerate null keys. */ - public E ceiling(E o) { - return m.ceilingKey(o); + public E ceiling(E e) { + return m.ceilingKey(e); } /** * Returns an element strictly less than the given element, or * null if there is no such element. - * - * @param o the value to match + * + * @param e the value to match * @return the greatest element less than the given element, or * null if there is no such element. - * @throws ClassCastException if o cannot be compared with the elements + * @throws ClassCastException if e cannot be compared with the elements * currently in the set. - * @throws NullPointerException if o is null and this map + * @throws NullPointerException if e is null and this map * uses natural ordering and is non-empty, or its comparator does * not tolerate null keys. */ - public E lower(E o) { - return m.lowerKey(o); + public E lower(E e) { + return m.lowerKey(e); } /** * Returns an element less than or equal to the given element, or * null if there is no such element. - * - * @param o the value to match + * + * @param e the value to match * @return the greatest element less than or equal to given * element, or null if there is no such element. - * @throws ClassCastException if o cannot be compared with the elements + * @throws ClassCastException if e cannot be compared with the elements * currently in the set. - * @throws NullPointerException if o is null and this map + * @throws NullPointerException if e is null and this map * uses natural ordering and is non-empty, or its comparator does * not tolerate null keys. */ - public E floor(E o) { - return m.floorKey(o); + public E floor(E e) { + return m.floorKey(e); } /** * Returns an element strictly greater than the given element, or * null if there is no such element. - * - * @param o the value to match + * + * @param e the value to match * @return the least element greater than the given element, or * null if there is no such element. - * @throws ClassCastException if o cannot be compared with the elements + * @throws ClassCastException if e cannot be compared with the elements * currently in the set. - * @throws NullPointerException if o is null and this map + * @throws NullPointerException if e is null and this map * uses natural ordering and is non-empty, or its comparator does * not tolerate null keys. */ - public E higher(E o) { - return m.higherKey(o); + public E higher(E e) { + return m.higherKey(e); } /** @@ -652,7 +652,7 @@ public class TreeSet s.defaultReadObject(); // Read in Comparator - Comparator c = (Comparator) s.readObject(); + Comparator c = (Comparator) s.readObject(); // Create backing TreeMap TreeMap tm;