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.5 by dl, Sun Jun 8 00:44:20 2003 UTC vs.
Revision 1.6 by brian, Mon Jun 23 02:26:15 2003 UTC

# Line 10 | Line 10 | package java.util;
10   * A Collection designed for holding elements prior to processing.
11   * Besides basic {@link Collection} operations, queues provide
12   * additional insertion, extraction, and inspection operations.
13 < *
13 > 0 *
14   * <p>Queues typically, but do not necessarily, order elements in a
15   * FIFO (first-in-first-out) manner.  Among the exceptions are
16   * priority queues, which order elements according to a supplied
# Line 30 | Line 30 | package java.util;
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.
33 > * to) first-in-first-out (FIFO), last-in-first-out (LIFO), 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 46 | Line 46 | package java.util;
46   * extends this interface.
47   *
48   * <p><tt>Queue</tt> implementations generally do not allow insertion of
49 < * <tt>null</tt> elements.  Even in the few implementations that permit it,
50 < * it is a bad idea, as <tt>null</tt> is also used as a special return value
49 > * <tt>null</tt> elements, although some implementations, such as
50 > * {@link LinkedList}, do not prohibit insertion of <tt>null</tt>.
51 > * Even in the implementations that permit it, <tt>null</tt> should not be inserted into
52 > * a <tt>Queue</tt>, as <tt>null</tt> is also used as a special return value
53   * by the <tt>poll</tt> method to indicate that the queue contains no
54   * elements.
55   *
# Line 58 | Line 60 | package java.util;
60   * @see Collection
61   * @see LinkedList
62   * @see PriorityQueue
63 < * @see LinkedQueue
63 > * @see java.util.concurrent.LinkedQueue
64   * @see java.util.concurrent.BlockingQueue
65   * @see java.util.concurrent.ArrayBlockingQueue
66   * @see java.util.concurrent.LinkedBlockingQueue

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines