[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.44, Fri Jul 8 20:02:54 2016 UTC revision 1.45, Wed Apr 19 23:45:50 2017 UTC
# Line 8  Line 8 
8    
9  /**  /**
10   * A collection designed for holding elements prior to processing.   * A collection designed for holding elements prior to processing.
11   * Besides basic {@link java.util.Collection Collection} operations,   * Besides basic {@link Collection} operations, queues provide
12   * queues provide additional insertion, extraction, and inspection   * additional insertion, extraction, and inspection operations.
13   * operations.  Each of these methods exists in two forms: one throws   * Each of these methods exists in two forms: one throws an exception
14   * an exception if the operation fails, the other returns a special   * if the operation fails, the other returns a special value (either
15   * value (either {@code null} or {@code false}, depending on the   * {@code null} or {@code false}, depending on the operation).  The
16   * operation).  The latter form of the insert operation is designed   * latter form of the insert operation is designed specifically for
17   * specifically for use with capacity-restricted {@code Queue}   * use with capacity-restricted {@code Queue} implementations; in most
18   * implementations; in most implementations, insert operations cannot   * implementations, insert operations cannot fail.
  * fail.  
19   *   *
20   * <table BORDER CELLPADDING=3 CELLSPACING=1>   * <table BORDER CELLPADDING=3 CELLSPACING=1>
21   * <caption>Summary of Queue methods</caption>   * <caption>Summary of Queue methods</caption>
# Line 27  Line 26 
26   *  </tr>   *  </tr>
27   *  <tr>   *  <tr>
28   *    <td><b>Insert</b></td>   *    <td><b>Insert</b></td>
29   *    <td>{@link Queue#add add(e)}</td>   *    <td>{@link #add(Object) add(e)}</td>
30   *    <td>{@link Queue#offer offer(e)}</td>   *    <td>{@link #offer(Object) offer(e)}</td>
31   *  </tr>   *  </tr>
32   *  <tr>   *  <tr>
33   *    <td><b>Remove</b></td>   *    <td><b>Remove</b></td>
34   *    <td>{@link Queue#remove remove()}</td>   *    <td>{@link #remove() remove()}</td>
35   *    <td>{@link Queue#poll poll()}</td>   *    <td>{@link #poll() poll()}</td>
36   *  </tr>   *  </tr>
37   *  <tr>   *  <tr>
38   *    <td><b>Examine</b></td>   *    <td><b>Examine</b></td>
39   *    <td>{@link Queue#element element()}</td>   *    <td>{@link #element() element()}</td>
40   *    <td>{@link Queue#peek peek()}</td>   *    <td>{@link #peek() peek()}</td>
41   *  </tr>   *  </tr>
42   * </table>   * </table>
43   *   *
# Line 144  Line 143 
143    
144      /**      /**
145       * Retrieves and removes the head of this queue.  This method differs       * Retrieves and removes the head of this queue.  This method differs
146       * from {@link #poll poll} only in that it throws an exception if this       * from {@link #poll() poll()} only in that it throws an exception if
147       * queue is empty.       * this queue is empty.
148       *       *
149       * @return the head of this queue       * @return the head of this queue
150       * @throws NoSuchElementException if this queue is empty       * @throws NoSuchElementException if this queue is empty

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8