--- jsr166/src/main/java/util/TreeSet.java 2005/06/24 20:44:49 1.17 +++ jsr166/src/main/java/util/TreeSet.java 2005/07/18 01:14:34 1.18 @@ -29,15 +29,16 @@ import java.util.*; // for javadoc (till * is well-defined even if its ordering is inconsistent with equals; it * just fails to obey the general contract of the Set interface. * - *

Note that this implementation is not synchronized. If multiple - * threads access a set concurrently, and at least one of the threads modifies - * the set, it must be synchronized externally. This is typically - * accomplished by synchronizing on some object that naturally encapsulates - * the set. If no such object exists, the set should be "wrapped" using the - * Collections.synchronizedSet method. This is best done at creation - * time, to prevent accidental unsynchronized access to the set:

- *     SortedSet s = Collections.synchronizedSortedSet(new TreeSet(...));
- * 
+ *

Note that this implementation is not synchronized. + * If multiple threads access a tree set concurrently, and at least one + * of the threads modifies the set, it must be synchronized + * externally. This is typically accomplished by synchronizing on some + * object that naturally encapsulates the set. + * If no such object exists, the set should be "wrapped" using the + * {@link Collections#synchronizedSortedSet Collections.synchronizedSortedSet} + * method. This is best done at creation time, to prevent accidental + * unsynchronized access to the set:

+ *   SortedSet s = Collections.synchronizedSortedSet(new TreeSet(...));
* *

The iterators returned by this class's iterator method are * fail-fast: if the set is modified at any time after the iterator is @@ -68,7 +69,6 @@ import java.util.*; // for javadoc (till * @see HashSet * @see Comparable * @see Comparator - * @see Collections#synchronizedSortedSet(SortedSet) * @see TreeMap * @since 1.2 */