ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/Queue.java
(Generate patch)

Comparing jsr166/src/main/java/util/Queue.java (file contents):
Revision 1.2 by tim, Sun May 18 18:10:02 2003 UTC vs.
Revision 1.3 by dl, Tue May 27 18:20:06 2003 UTC

# Line 1 | Line 1
1 + /*
2 + * Written by Doug Lea with assistance from members of JCP JSR-166
3 + * Expert Group and released to the public domain. Use, modify, and
4 + * redistribute this code in any way without acknowledgement.
5 + */
6 +
7   package java.util;
8  
9   /**
# Line 17 | Line 23 | package java.util;
23   * failure. It is designed for use in collections in which failure to
24   * add is a normal, rather than exceptional occurrence, for example,
25   * in fixed-capacity (or “bounded”) queues.
26 < *
26 > *
27   * <p>The {@link #remove()} and {@link #poll()} methods remove and return an
28   * element in accord with the implementation's ordering policy. For example,
29   * in FIFO queues, they remove and return the oldest element in the queue.
# Line 71 | Line 77 | public interface Queue<E> extends Collec
77       * to) first-in-first-out (FIFO), element priority, and arbitrary.
78       *
79       * @return an element previously on the queue, or <tt>null</tt> if the
80 <     *         queue is empty.
80 >     *         queue is empty.
81       */
82      public E poll();
83  
84      /**
85       * Remove and return an element from the queue.  This method differs
86       * from the <tt>poll</tt> method in that it throws an exception if the
87 <     * queue is empty.
87 >     * queue is empty.
88       *
89       * @return an element previously on the queue.
90       * @throws NoSuchElementException if the queue is empty.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines