[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.17, Fri Sep 12 15:38:26 2003 UTC revision 1.18, Sat Sep 13 18:51:06 2003 UTC
# Line 96  Line 96 
96      boolean offer(E o);      boolean offer(E o);
97    
98      /**      /**
99       * Retrieves and removes the head of this queue, if it is available.       * Retrieves and removes the head of this queue, or <tt>null</tt>
100         * if this queue is empty.
101       *       *
102       * @return the head of this queue, or <tt>null</tt> if this       * @return the head of this queue, or <tt>null</tt> if this
103       *         queue is empty.       *         queue is empty.
# Line 104  Line 105 
105      E poll();      E poll();
106    
107      /**      /**
108       * Retrieves and removes the head of this queue.       * Retrieves and removes the head of this queue.  This method
109       * This method differs       * differs from the <tt>poll</tt> method in that it throws an
110       * from the <tt>poll</tt> method in that it throws an exception if this       * exception if this queue is empty.
      * queue is empty.  
111       *       *
112       * @return the head of this queue.       * @return the head of this queue.
113       * @throws NoSuchElementException if this queue is empty.       * @throws NoSuchElementException if this queue is empty.
# Line 115  Line 115 
115      E remove();      E remove();
116    
117      /**      /**
118       * Retrieves, but does not remove, the head of this queue.       * Retrieves, but does not remove, the head of this queue,
119       * This method differs from the <tt>poll</tt>       * returning <tt>null</tt> if this queue is empty.
      * method only in that this method does not remove the head element from  
      * this queue.  
120       *       *
121       * @return the head of this queue, or <tt>null</tt> if this queue is empty.       * @return the head of this queue, or <tt>null</tt> if this queue
122         * is empty.
123       */       */
124      E peek();      E peek();
125    

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8