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.3 by dl, Tue May 27 18:20:06 2003 UTC vs.
Revision 1.5 by dl, Sun Jun 8 00:44:20 2003 UTC

# Line 12 | Line 12 | package java.util;
12   * additional insertion, extraction, and inspection operations.
13   *
14   * <p>Queues typically, but do not necessarily, order elements in a
15 < * FIFO (first-in-first-out) manner.  Among the exceptions are priority
16 < * queues, which order elements according to a supplied comparators, or
17 < * the elements natural ordering.  Every Queue implementation must specify
18 < * its ordering guarantees.
15 > * FIFO (first-in-first-out) manner.  Among the exceptions are
16 > * priority queues, which order elements according to a supplied
17 > * comparator, or the elements' natural ordering.  Every Queue
18 > * implementation must specify its ordering guarantees.
19   *
20   * <p>The {@link #offer(E)} method adds an element if possible, otherwise
21   * returning <tt>false</tt>.  This differs from the {@link
# Line 23 | 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 &ldquo;bounded&rdquo;) queues.
26 +
27   *
28   * <p>The {@link #remove()} and {@link #poll()} methods remove and return an
29 < * element in accord with the implementation's ordering policy. For example,
30 < * in FIFO queues, they remove and return the oldest element in the queue.
29 > * element in accord with the implementation's ordering policy.
30 > * Exactly which element is removed from the queue is a function
31 > * of the queue's ordering policy, which differs from implementation
32 > * to implementation.  Possible orderings include (but are not limited
33 > * to) first-in-first-out (FIFO), element priority, and arbitrary.
34   * The <tt>remove()</tt> and <tt>poll()</tt> methods differ only in their
35   * behavior when the queue is empty: the <tt>remove()</tt> method throws an
36   * exception, while the <tt>poll()</tt> method returns <tt>null</tt>.
# Line 71 | Line 75 | public interface Queue<E> extends Collec
75  
76      /**
77       * Remove and return an element from the queue if one is available.
74     * Exactly which element is removed from the queue is a function
75     * of the queue's ordering policy, which differs from implementation
76     * to implementation.  Possible orderings include (but are not limited
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.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines