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

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

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

revision 1.4, Tue Mar 22 16:48:32 2005 UTC revision 1.5, Fri Apr 29 02:00:39 2005 UTC
# Line 25  Line 25 
25   * operations cannot fail.   * operations cannot fail.
26   *   *
27   * <p>The twelve methods described above are summarized in the   * <p>The twelve methods described above are summarized in the
28   * following table:<p>   * following table:
29   *   *
30   * <table BORDER CELLPADDING=3 CELLSPACING=1>   * <p><table BORDER CELLPADDING=3 CELLSPACING=1>
31   *  <tr>   *  <tr>
32   *    <td></td>   *    <td></td>
33   *    <td ALIGN=CENTER COLSPAN = 2> <b>First Element (Head)</b></td>   *    <td ALIGN=CENTER COLSPAN = 2> <b>First Element (Head)</b></td>
# Line 67  Line 67 
67   * used as a queue, FIFO (First-In-First-Out) behavior results.  Elements are   * used as a queue, FIFO (First-In-First-Out) behavior results.  Elements are
68   * added at the end of the deque and removed from the beginning.  The methods   * added at the end of the deque and removed from the beginning.  The methods
69   * inherited from the <tt>Queue</tt> interface are precisely equivalent to   * inherited from the <tt>Queue</tt> interface are precisely equivalent to
70   * <tt>Deque</tt> methods as indicated in the following table:<p>   * <tt>Deque</tt> methods as indicated in the following table:
71   *   *
72   * <table BORDER CELLPADDING=3 CELLSPACING=1>   * <p><table BORDER CELLPADDING=3 CELLSPACING=1>
73   *  <tr>   *  <tr>
74   *    <td ALIGN=CENTER> <b><tt>Queue</tt> Method</b></td>   *    <td ALIGN=CENTER> <b><tt>Queue</tt> Method</b></td>
75   *    <td ALIGN=CENTER> <b>Equivalent <tt>Deque</tt> Method</b></td>   *    <td ALIGN=CENTER> <b>Equivalent <tt>Deque</tt> Method</b></td>
76   *  </tr>   *  </tr>
77   *  <tr>   *  <tr>
  *   <tr>  
78   *    <td>{@link java.util.Queue#offer offer(e)}</td>   *    <td>{@link java.util.Queue#offer offer(e)}</td>
79   *    <td>{@link #offerLast offerLast(e)}</td>   *    <td>{@link #offerLast offerLast(e)}</td>
80   *   </tr>   *   </tr>
# Line 105  Line 104 
104   * interface should be used in preference to the legacy {@link Stack} class.   * interface should be used in preference to the legacy {@link Stack} class.
105   * When a deque is used as a stack, elements are pushed and popped from the   * When a deque is used as a stack, elements are pushed and popped from the
106   * beginning of the deque.  Stack methods are precisely equivalent to   * beginning of the deque.  Stack methods are precisely equivalent to
107   * <tt>Deque</tt> methods as indicated in the table below:<p>   * <tt>Deque</tt> methods as indicated in the table below:
108   *   *
109   * <table BORDER CELLPADDING=3 CELLSPACING=1>   * <p><table BORDER CELLPADDING=3 CELLSPACING=1>
110   *  <tr>   *  <tr>
111   *    <td ALIGN=CENTER> <b>Stack Method</b></td>   *    <td ALIGN=CENTER> <b>Stack Method</b></td>
112   *    <td ALIGN=CENTER> <b>Equivalent <tt>Deque</tt> Method</b></td>   *    <td ALIGN=CENTER> <b>Equivalent <tt>Deque</tt> Method</b></td>
113   *  </tr>   *  </tr>
114   *  <tr>   *  <tr>
  *   <tr>  
115   *    <td>{@link #push push(e)}</td>   *    <td>{@link #push push(e)}</td>
116   *    <td>{@link #addFirst addFirst(e)}</td>   *    <td>{@link #addFirst addFirst(e)}</td>
117   *   </tr>   *   </tr>
# Line 232  Line 230 
230      E pollLast();      E pollLast();
231    
232      /**      /**
233       * Removes and returns the first element of this deque.  This method       * Retrieves and removes the first element of this deque.  This method
234       * differs from the <tt>pollFirst</tt> method only in that it throws an       * differs from the <tt>pollFirst</tt> method only in that it throws an
235       * exception if this deque is empty.       * exception if this deque is empty.
236       *       *

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

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8