ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/LinkedBlockingQueue.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/LinkedBlockingQueue.java (file contents):
Revision 1.21 by dl, Sat Sep 13 18:51:11 2003 UTC vs.
Revision 1.22 by dholmes, Mon Sep 15 06:24:21 2003 UTC

# Line 214 | Line 214 | public class LinkedBlockingQueue<E> exte
214          return capacity - count.get();
215      }
216  
217 +    /**
218 +     * Adds the specified element to the tail of this queue, waiting if
219 +     * necessary for space to become available.
220 +     * @throws NullPointerException if the specified element is <tt>null</tt>.
221 +     */
222      public void put(E o) throws InterruptedException {
223          if (o == null) throw new NullPointerException();
224          // Note: convention in all put/take/etc is to preset
# Line 248 | Line 253 | public class LinkedBlockingQueue<E> exte
253              signalNotEmpty();
254      }
255  
256 +    /**
257 +     * Inserts the specified element at the tail of this queue, waiting if
258 +     * necessary up to the specified wait time for space to become available.
259 +     * @throws NullPointerException if the specified element is <tt>null</tt>.
260 +     */
261      public boolean offer(E o, long timeout, TimeUnit unit)
262          throws InterruptedException {
263  
# Line 282 | Line 292 | public class LinkedBlockingQueue<E> exte
292      }
293  
294     /**
295 <    * Adds the specified element to the tail of this queue if possible,
295 >    * Inserts the specified element at the tail of this queue if possible,
296      * returning immediately if this queue is full.
297      *
288    * @param o the element to add.
289    * @return <tt>true</tt> if it was possible to add the element to
290    *         this queue, else <tt>false</tt>
298      * @throws NullPointerException if the specified element is <tt>null</tt>
299      */
300      public boolean offer(E o) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines