[cvs] / jsr166 / src / main / java / util / Queue.java Repository:
ViewVC logotype

Diff of /jsr166/src/main/java/util/Queue.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5, Sun Jun 8 00:44:20 2003 UTC revision 1.6, Mon Jun 23 02:26:15 2003 UTC
# Line 10  Line 10 
10   * A Collection designed for holding elements prior to processing.   * A Collection designed for holding elements prior to processing.
11   * Besides basic {@link Collection} operations, queues provide   * Besides basic {@link Collection} operations, queues provide
12   * additional insertion, extraction, and inspection operations.   * additional insertion, extraction, and inspection operations.
13   *  0 *
14   * <p>Queues typically, but do not necessarily, order elements in a   * <p>Queues typically, but do not necessarily, order elements in a
15   * FIFO (first-in-first-out) manner.  Among the exceptions are   * FIFO (first-in-first-out) manner.  Among the exceptions are
16   * priority queues, which order elements according to a supplied   * priority queues, which order elements according to a supplied
# Line 30  Line 30 
30   * Exactly which element is removed from the queue is a function   * Exactly which element is removed from the queue is a function
31   * of the queue's ordering policy, which differs from implementation   * of the queue's ordering policy, which differs from implementation
32   * to implementation.  Possible orderings include (but are not limited   * to implementation.  Possible orderings include (but are not limited
33   * to) first-in-first-out (FIFO), element priority, and arbitrary.   * 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   * 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   * 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>.   * exception, while the <tt>poll()</tt> method returns <tt>null</tt>.
# Line 46  Line 46 
46   * extends this interface.   * extends this interface.
47   *   *
48   * <p><tt>Queue</tt> implementations generally do not allow insertion of   * <p><tt>Queue</tt> implementations generally do not allow insertion of
49   * <tt>null</tt> elements.  Even in the few implementations that permit it,   * <tt>null</tt> elements, although some implementations, such as
50   * it is a bad idea, as <tt>null</tt> is also used as a special return value   * {@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   * by the <tt>poll</tt> method to indicate that the queue contains no
54   * elements.   * elements.
55   *   *
# Line 58  Line 60 
60   * @see Collection   * @see Collection
61   * @see LinkedList   * @see LinkedList
62   * @see PriorityQueue   * @see PriorityQueue
63   * @see LinkedQueue   * @see java.util.concurrent.LinkedQueue
64   * @see java.util.concurrent.BlockingQueue   * @see java.util.concurrent.BlockingQueue
65   * @see java.util.concurrent.ArrayBlockingQueue   * @see java.util.concurrent.ArrayBlockingQueue
66   * @see java.util.concurrent.LinkedBlockingQueue   * @see java.util.concurrent.LinkedBlockingQueue

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8