[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.3, Tue Mar 22 01:29:00 2005 UTC revision 1.4, Tue Mar 22 16:48:32 2005 UTC
# Line 65  Line 65 
65   *   *
66   * <p>This interface extends the {@link Queue} interface.  When a deque is   * <p>This interface extends the {@link Queue} interface.  When a deque is
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 to 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:<p>
71   *   *
# Line 176  Line 176 
176      boolean offerFirst(E e);      boolean offerFirst(E e);
177    
178      /**      /**
179       * Inserts the specified element to the end of this deque unless it would       * Inserts the specified element at the end of this deque unless it would
180       * violate capacity restrictions.  When using a capacity-restricted deque,       * violate capacity restrictions.  When using a capacity-restricted deque,
181       * this method is generally preferable to method <tt>addLast</tt> which       * this method is generally preferable to method <tt>addLast</tt> which
182       * can fail to insert an element only by throwing an exception.       * can fail to insert an element only by throwing an exception.
# Line 202  Line 202 
202      void addFirst(E e);      void addFirst(E e);
203    
204      /**      /**
205       * Inserts the specified element to the end of this deque unless it would       * Inserts the specified element at the end of this deque unless it would
206       * violate capacity restrictions.       * violate capacity restrictions.
207       *       *
208       * @param e the element to insert       * @param e the element to insert
# Line 298  Line 298 
298       *       *
299       * @param o element to be removed from this deque, if present       * @param o element to be removed from this deque, if present
300       * @return <tt>true</tt> if the deque contained the specified element       * @return <tt>true</tt> if the deque contained the specified element
301       * @throws NullPointerException if the specified element is <tt>null</tt>       * @throws NullPointerException if the specified element is null and this
302         *     deque does not permit null elements
303       */       */
304      boolean removeFirstOccurrence(Object o);      boolean removeFirstOccurrence(Object o);
305    
# Line 311  Line 312 
312       *       *
313       * @param o element to be removed from this deque, if present       * @param o element to be removed from this deque, if present
314       * @return <tt>true</tt> if the deque contained the specified element       * @return <tt>true</tt> if the deque contained the specified element
315       * @throws NullPointerException if the specified element is <tt>null</tt>       * @throws NullPointerException if the specified element is null and this
316         *     deque does not permit null elements
317       */       */
318      boolean removeLastOccurrence(Object o);      boolean removeLastOccurrence(Object o);
319    
# Line 321  Line 323 
323      /**      /**
324       * Inserts the specified element into the queue represented by this deque       * Inserts the specified element into the queue represented by this deque
325       * unless it would violate capacity restrictions.  In other words, inserts       * unless it would violate capacity restrictions.  In other words, inserts
326       * the specified element to the end of this deque.  When using a       * the specified element at the end of this deque.  When using a
327       * capacity-restricted deque, this method is generally preferable to the       * capacity-restricted deque, this method is generally preferable to the
328       * {@link #add} method, which can fail to insert an element only by       * {@link #add} method, which can fail to insert an element only by
329       * throwing an exception.       * throwing an exception.

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

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8