ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166y/LinkedTransferQueue.java
(Generate patch)

Comparing jsr166/src/jsr166y/LinkedTransferQueue.java (file contents):
Revision 1.28 by jsr166, Sun Jul 26 17:33:37 2009 UTC vs.
Revision 1.29 by jsr166, Mon Jul 27 03:21:19 2009 UTC

# Line 442 | Line 442 | public class LinkedTransferQueue<E> exte
442          addAll(c);
443      }
444  
445 +    /**
446 +     * @throws InterruptedException {@inheritDoc}
447 +     * @throws NullPointerException {@inheritDoc}
448 +     */
449      public void put(E e) throws InterruptedException {
450          if (e == null) throw new NullPointerException();
451          if (Thread.interrupted()) throw new InterruptedException();
452          xfer(e, NOWAIT, 0);
453      }
454  
455 +    /**
456 +     * @throws InterruptedException {@inheritDoc}
457 +     * @throws NullPointerException {@inheritDoc}
458 +     */
459      public boolean offer(E e, long timeout, TimeUnit unit)
460          throws InterruptedException {
461          if (e == null) throw new NullPointerException();
# Line 456 | Line 464 | public class LinkedTransferQueue<E> exte
464          return true;
465      }
466  
467 +    /**
468 +     * @throws NullPointerException {@inheritDoc}
469 +     */
470      public boolean offer(E e) {
471          if (e == null) throw new NullPointerException();
472          xfer(e, NOWAIT, 0);
473          return true;
474      }
475  
476 +    /**
477 +     * @throws NullPointerException {@inheritDoc}
478 +     */
479      public boolean add(E e) {
480          if (e == null) throw new NullPointerException();
481          xfer(e, NOWAIT, 0);
482          return true;
483      }
484  
485 +    /**
486 +     * @throws InterruptedException {@inheritDoc}
487 +     * @throws NullPointerException {@inheritDoc}
488 +     */
489      public void transfer(E e) throws InterruptedException {
490          if (e == null) throw new NullPointerException();
491          if (xfer(e, WAIT, 0) == null) {
# Line 476 | Line 494 | public class LinkedTransferQueue<E> exte
494          }
495      }
496  
497 +    /**
498 +     * @throws InterruptedException {@inheritDoc}
499 +     * @throws NullPointerException {@inheritDoc}
500 +     */
501      public boolean tryTransfer(E e, long timeout, TimeUnit unit)
502          throws InterruptedException {
503          if (e == null) throw new NullPointerException();
# Line 486 | Line 508 | public class LinkedTransferQueue<E> exte
508          throw new InterruptedException();
509      }
510  
511 +    /**
512 +     * @throws NullPointerException {@inheritDoc}
513 +     */
514      public boolean tryTransfer(E e) {
515          if (e == null) throw new NullPointerException();
516          return fulfill(e) != null;
517      }
518  
519 +    /**
520 +     * @throws InterruptedException {@inheritDoc}
521 +     */
522      public E take() throws InterruptedException {
523          Object e = xfer(null, WAIT, 0);
524          if (e != null)
# Line 499 | Line 527 | public class LinkedTransferQueue<E> exte
527          throw new InterruptedException();
528      }
529  
530 +    /**
531 +     * @throws InterruptedException {@inheritDoc}
532 +     */
533      public E poll(long timeout, TimeUnit unit) throws InterruptedException {
534          Object e = xfer(null, TIMEOUT, unit.toNanos(timeout));
535          if (e != null || !Thread.interrupted())
# Line 510 | Line 541 | public class LinkedTransferQueue<E> exte
541          return fulfill(null);
542      }
543  
544 +    /**
545 +     * @throws NullPointerException    {@inheritDoc}
546 +     * @throwsIllegalArgumentException {@inheritDoc}
547 +     */
548      public int drainTo(Collection<? super E> c) {
549          if (c == null)
550              throw new NullPointerException();
# Line 524 | Line 559 | public class LinkedTransferQueue<E> exte
559          return n;
560      }
561  
562 +    /**
563 +     * @throws NullPointerException    {@inheritDoc}
564 +     * @throwsIllegalArgumentException {@inheritDoc}
565 +     */
566      public int drainTo(Collection<? super E> c, int maxElements) {
567          if (c == null)
568              throw new NullPointerException();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines