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.16 by jsr166, Sun Jun 19 23:01:12 2005 UTC vs.
Revision 1.17 by jsr166, Fri Jun 24 20:44:49 2005 UTC

# Line 167 | Line 167 | public class TreeSet<E>
167       * Returns an iterator over the elements in this set in descending order.
168       *
169       * @return an iterator over the elements in this set in descending order
170 +     * @since 1.6
171       */
172      public Iterator<E> descendingIterator() {
173          return m.descendingKeySet().iterator();
# Line 292 | Line 293 | public class TreeSet<E>
293       *         <tt>toElement</tt> is null and this set uses natural ordering,
294       *         or its comparator does not permit null elements
295       * @throws IllegalArgumentException {@inheritDoc}
296 +     * @since 1.6
297       */
298      public NavigableSet<E> navigableSubSet(E fromElement, E toElement) {
299          return new TreeSet<E>(m.navigableSubMap(fromElement, toElement));
# Line 303 | Line 305 | public class TreeSet<E>
305       *         this set uses natural ordering, or its comparator does
306       *         not permit null elements
307       * @throws IllegalArgumentException {@inheritDoc}
308 +     * @since 1.6
309       */
310      public NavigableSet<E> navigableHeadSet(E toElement) {
311          return new TreeSet<E>(m.navigableHeadMap(toElement));
# Line 314 | Line 317 | public class TreeSet<E>
317       *         this set uses natural ordering, or its comparator does
318       *         not permit null elements
319       * @throws IllegalArgumentException {@inheritDoc}
320 +     * @since 1.6
321       */
322      public NavigableSet<E> navigableTailSet(E fromElement) {
323          return new TreeSet<E>(m.navigableTailMap(fromElement));
# Line 392 | Line 396 | public class TreeSet<E>
396       * @throws NullPointerException if the specified element is null
397       *         and this set uses natural ordering, or its comparator
398       *         does not permit null elements
399 +     * @since 1.6
400       */
401      public E lower(E e) {
402          return m.lowerKey(e);
# Line 402 | Line 407 | public class TreeSet<E>
407       * @throws NullPointerException if the specified element is null
408       *         and this set uses natural ordering, or its comparator
409       *         does not permit null elements
410 +     * @since 1.6
411       */
412      public E floor(E e) {
413          return m.floorKey(e);
# Line 412 | Line 418 | public class TreeSet<E>
418       * @throws NullPointerException if the specified element is null
419       *         and this set uses natural ordering, or its comparator
420       *         does not permit null elements
421 +     * @since 1.6
422       */
423      public E ceiling(E e) {
424          return m.ceilingKey(e);
# Line 422 | Line 429 | public class TreeSet<E>
429       * @throws NullPointerException if the specified element is null
430       *         and this set uses natural ordering, or its comparator
431       *         does not permit null elements
432 +     * @since 1.6
433       */
434      public E higher(E e) {
435          return m.higherKey(e);
436      }
437  
438 +    /**
439 +     * @since 1.6
440 +     */
441      public E pollFirst() {
442          Map.Entry<E,?> e = m.pollFirstEntry();
443          return (e == null)? null : e.getKey();
444      }
445  
446 +    /**
447 +     * @since 1.6
448 +     */
449      public E pollLast() {
450          Map.Entry<E,?> e = m.pollLastEntry();
451          return (e == null)? null : e.getKey();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines