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.22 by dholmes, Mon Sep 15 06:24:21 2003 UTC vs.
Revision 1.23 by dl, Mon Sep 15 12:02:46 2003 UTC

# Line 217 | Line 217 | public class LinkedBlockingQueue<E> exte
217      /**
218       * Adds the specified element to the tail of this queue, waiting if
219       * necessary for space to become available.
220 +     * @param o the element to add
221 +     * @throws InterruptedException if interrupted while waiting.
222       * @throws NullPointerException if the specified element is <tt>null</tt>.
223       */
224      public void put(E o) throws InterruptedException {
# Line 256 | Line 258 | public class LinkedBlockingQueue<E> exte
258      /**
259       * Inserts the specified element at the tail of this queue, waiting if
260       * necessary up to the specified wait time for space to become available.
261 +     * @param o the element to add
262 +     * @param timeout how long to wait before giving up, in units of
263 +     * <tt>unit</tt>
264 +     * @param unit a <tt>TimeUnit</tt> determining how to interpret the
265 +     * <tt>timeout</tt> parameter
266 +     * @return <tt>true</tt> if successful, or <tt>false</tt> if
267 +     * the specified waiting time elapses before space is available.
268 +     * @throws InterruptedException if interrupted while waiting.
269       * @throws NullPointerException if the specified element is <tt>null</tt>.
270       */
271      public boolean offer(E o, long timeout, TimeUnit unit)
# Line 291 | Line 301 | public class LinkedBlockingQueue<E> exte
301          return true;
302      }
303  
304 <   /**
305 <    * Inserts the specified element at the tail of this queue if possible,
306 <    * returning immediately if this queue is full.
307 <    *
308 <    * @throws NullPointerException if the specified element is <tt>null</tt>
309 <    */
304 >    /**
305 >     * Inserts the specified element at the tail of this queue if possible,
306 >     * returning immediately if this queue is full.
307 >     *
308 >     * @param o the element to add.
309 >     * @return <tt>true</tt> if it was possible to add the element to
310 >     *         this queue, else <tt>false</tt>
311 >     * @throws NullPointerException if the specified element is <tt>null</tt>
312 >     */
313      public boolean offer(E o) {
314          if (o == null) throw new NullPointerException();
315          if (count.get() == capacity)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines