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.43 by jsr166, Tue May 17 06:50:55 2005 UTC vs.
Revision 1.44 by jsr166, Tue May 17 17:13:01 2005 UTC

# Line 224 | Line 224 | public class LinkedBlockingQueue<E> exte
224      }
225  
226      /**
227 <     * Adds the specified element to the tail of this queue, waiting if
227 >     * Inserts the specified element at the tail of this queue, waiting if
228       * necessary for space to become available.
229       *
230       * @throws InterruptedException {@inheritDoc}
# Line 311 | Line 311 | public class LinkedBlockingQueue<E> exte
311      }
312  
313      /**
314 <     * Inserts the specified element at the tail of this queue if possible,
315 <     * returning immediately if this queue is full.
314 >     * Inserts the specified element at the tail of this queue if it is
315 >     * possible to do so immediately without exceeding the queue's capacity,
316 >     * returning <tt>true</tt> upon success and <tt>false</tt> if this queue
317 >     * is full.
318 >     * When using a capacity-restricted queue, this method is generally
319 >     * preferable to method {@link BlockingQueue#add add}, which can fail to
320 >     * insert an element only by throwing an exception.
321       *
317     * @return <tt>true</tt> if it was possible to add the element to
318     *         this queue, else <tt>false</tt>
322       * @throws NullPointerException if the specified element is null
323       */
324      public boolean offer(E e) {
# Line 443 | Line 446 | public class LinkedBlockingQueue<E> exte
446      }
447  
448      /**
449 <     * Removes a single instance of the specified element from this
450 <     * queue, if it is present.
449 >     * Removes a single instance of the specified element from this queue,
450 >     * if it is present.  More formally, removes an element <tt>e</tt> such
451 >     * that <tt>o.equals(e)</tt>, if this queue contains one or more such
452 >     * elements.
453 >     * Returns <tt>true</tt> if this queue contained the specified element
454 >     * (or equivalently, if this queue changed as a result of the call).
455 >     *
456 >     * @param o element to be removed from this queue, if present
457 >     * @return <tt>true</tt> if this queue changed as a result of the call
458       */
459      public boolean remove(Object o) {
460          if (o == null) return false;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines