[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.3, Tue May 27 18:20:06 2003 UTC revision 1.4, Sat Jun 7 18:31:00 2003 UTC
# Line 23  Line 23 
23   * failure. It is designed for use in collections in which failure to   * failure. It is designed for use in collections in which failure to
24   * add is a normal, rather than exceptional occurrence, for example,   * add is a normal, rather than exceptional occurrence, for example,
25   * in fixed-capacity (or “bounded”) queues.   * in fixed-capacity (or “bounded”) queues.
26    
27   *   *
28   * <p>The {@link #remove()} and {@link #poll()} methods remove and return an   * <p>The {@link #remove()} and {@link #poll()} methods remove and return an
29   * element in accord with the implementation's ordering policy. For example,   * element in accord with the implementation's ordering policy.
30   * in FIFO queues, they remove and return the oldest element in the queue.   * 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   * 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 71  Line 75 
75    
76      /**      /**
77       * Remove and return an element from the queue if one is available.       * Remove and return an element from the queue if one is available.
      * Exactly which element is removed from the queue is a function  
      * of the queue's ordering policy, which differs from implementation  
      * to implementation.  Possible orderings include (but are not limited  
      * 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       * @return an element previously on the queue, or <tt>null</tt> if the
80       *         queue is empty.       *         queue is empty.

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8