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.3 by dl, Tue Mar 22 01:30:10 2005 UTC vs.
Revision 1.4 by dl, Tue Mar 29 15:00:48 2005 UTC

# Line 255 | Line 255 | public class TreeSet<E>
255       *
256       * @throws ClassCastException if the elements provided cannot be compared
257       *            with the elements currently in the set.
258 <     * @throws NullPointerException of the specified collection is
258 >     * @throws NullPointerException if the specified collection is
259       * <tt>null</tt> or if any element is <tt>null</tt> and this map
260       * uses natural ordering, or its comparator does not tolerate
261       * <tt>null</tt> keys.
# Line 299 | Line 299 | public class TreeSet<E>
299       * For example, suppose that <tt>s</tt> is a navigable set of
300       * strings.  The following idiom obtains a view containing all of
301       * the strings in <tt>s</tt> from <tt>low</tt> to <tt>high</tt>,
302 <     * inclusive: <pre> NavigableSet sub = s.subSet(low, high+"\0");
302 >     * inclusive:
303 >     * <pre> NavigableSet sub = s.navigableSubSet(low, high+"\0");
304       * </pre>
305       *
306       * A similar technique can be used to generate an <i>open range</i> (which
# Line 309 | Line 310 | public class TreeSet<E>
310       *     NavigableSet sub = s.navigableSubSet(low+"\0", high);
311       * </pre>
312       *
313 <     * @param fromElement low endpoint (inclusive) of the subSet.
314 <     * @param toElement high endpoint (exclusive) of the subSet.
313 >     * @param fromElement low endpoint (inclusive) of the range.
314 >     * @param toElement high endpoint (exclusive) of the range.
315       * @return a view of the portion of this set whose elements range from
316       *         <tt>fromElement</tt>, inclusive, to <tt>toElement</tt>,
317       *         exclusive.
# Line 353 | Line 354 | public class TreeSet<E>
354       *
355       * @param toElement high endpoint (exclusive) of the headSet.
356       * @return a view of the portion of this set whose elements are strictly
357 <     *         less than toElement.
357 >     *         less than <tt>toElement</tt>.
358       * @throws ClassCastException if <tt>toElement</tt> is not compatible
359       *         with this set's comparator (or, if the set has no comparator,
360       *         if <tt>toElement</tt> does not implement <tt>Comparable</tt>).
361 <     * @throws IllegalArgumentException if this set is itself a subSet,
362 <     *         headSet, or tailSet, and <tt>toElement</tt> is not within the
363 <     *         specified range of the subSet, headSet, or tailSet.
361 >     * @throws IllegalArgumentException if this set is itself a subset,
362 >     *         and <tt>toElement</tt> is not within the
363 >     *         specified range of the subset.
364       * @throws NullPointerException if <tt>toElement</tt> is <tt>null</tt> and
365       *         this set uses natural ordering, or its comparator does
366       *         not tolerate <tt>null</tt> elements.
# Line 396 | Line 397 | public class TreeSet<E>
397       * @throws ClassCastException if <tt>fromElement</tt> is not compatible
398       *         with this set's comparator (or, if the set has no comparator,
399       *         if <tt>fromElement</tt> does not implement <tt>Comparable</tt>).
400 <     * @throws IllegalArgumentException if this set is itself a subSet,
401 <     *         headSet, or tailSet, and <tt>fromElement</tt> is not within the
402 <     *         specified range of the subSet, headSet, or tailSet.
400 >     * @throws IllegalArgumentException if this set is itself a subset,
401 >     *         and <tt>fromElement</tt> is not within the
402 >     *         specified range of the subset.
403       * @throws NullPointerException if <tt>fromElement</tt> is <tt>null</tt>
404       *         and this set uses natural ordering, or its comparator does
405       *         not tolerate <tt>null</tt> elements.
# Line 411 | Line 412 | public class TreeSet<E>
412      /**
413       * Equivalent to <tt>navigableSubSet</tt> but with a return
414       * type conforming to the <tt>SortedSet</tt> interface.
415 <     * @param fromElement low endpoint (inclusive) of the subSet.
416 <     * @param toElement high endpoint (exclusive) of the subSet.
415 >     * @param fromElement low endpoint (inclusive) of the range.
416 >     * @param toElement high endpoint (exclusive) of the range.
417       * @return a view of the portion of this set whose elements range from
418       *         <tt>fromElement</tt>, inclusive, to <tt>toElement</tt>,
419       *         exclusive.
# Line 437 | Line 438 | public class TreeSet<E>
438       *
439       * @param toElement high endpoint (exclusive) of the headSet.
440       * @return a view of the portion of this set whose elements are strictly
441 <     *         less than toElement.
441 >     *         less than <tt>toElement</tt>.
442       * @throws ClassCastException if <tt>toElement</tt> is not compatible
443       *         with this set's comparator (or, if the set has no comparator,
444       *         if <tt>toElement</tt> does not implement <tt>Comparable</tt>).
445       * @throws IllegalArgumentException if this set is itself a subSet,
446 <     *         headSet, or tailSet, and <tt>toElement</tt> is not within the
447 <     *         specified range of the subSet, headSet, or tailSet.
446 >     *         and <tt>toElement</tt> is not within the
447 >     *         specified range of the subset.
448       * @throws NullPointerException if <tt>toElement</tt> is <tt>null</tt> and
449       *         this set uses natural ordering, or its comparator does
450       *         not tolerate <tt>null</tt> elements.
# Line 461 | Line 462 | public class TreeSet<E>
462       * @throws ClassCastException if <tt>fromElement</tt> is not compatible
463       *         with this set's comparator (or, if the set has no comparator,
464       *         if <tt>fromElement</tt> does not implement <tt>Comparable</tt>).
465 <     * @throws IllegalArgumentException if this set is itself a subSet,
466 <     *         headSet, or tailSet, and <tt>fromElement</tt> is not within the
467 <     *         specified range of the subSet, headSet, or tailSet.
465 >     * @throws IllegalArgumentException if this set is itself a subset,
466 >     *         and <tt>fromElement</tt> is not within the
467 >     *         specified range of the subset.
468       * @throws NullPointerException if <tt>fromElement</tt> is <tt>null</tt>
469       *         and this set uses natural ordering, or its comparator does
470       *         not tolerate <tt>null</tt> elements.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines