522 |
|
} |
523 |
|
|
524 |
|
/** |
525 |
< |
* Transfers the specified element immediately if there exists a |
526 |
< |
* consumer already waiting to receive it (in {@link #take} or |
527 |
< |
* timed {@link #poll(long,TimeUnit) poll}), otherwise |
528 |
< |
* returning {@code false} without enqueuing the element. |
525 |
> |
* Transfers the element to a waiting consumer immediately, if possible. |
526 |
> |
* |
527 |
> |
* <p>More precisely, transfers the specified element immediately |
528 |
> |
* if there exists a consumer already waiting to receive it (in |
529 |
> |
* {@link #take} or timed {@link #poll(long,TimeUnit) poll}), |
530 |
> |
* otherwise returning {@code false} without enqueuing the element. |
531 |
|
* |
532 |
|
* @throws NullPointerException if the specified element is null |
533 |
|
*/ |
537 |
|
} |
538 |
|
|
539 |
|
/** |
540 |
< |
* Inserts the specified element at the tail of this queue, |
541 |
< |
* waiting if necessary for the element to be received by a |
542 |
< |
* consumer invoking {@code take} or {@code poll}. |
540 |
> |
* Transfers the element to a consumer, waiting if necessary to do so. |
541 |
> |
* |
542 |
> |
* <p>More precisely, transfers the specified element immediately |
543 |
> |
* if there exists a consumer already waiting to receive it (in |
544 |
> |
* {@link #take} or timed {@link #poll(long,TimeUnit) poll}), |
545 |
> |
* else inserts the specified element at the tail of this queue |
546 |
> |
* and waits until the element is received by a consumer. |
547 |
|
* |
548 |
|
* @throws NullPointerException if the specified element is null |
549 |
|
*/ |
556 |
|
} |
557 |
|
|
558 |
|
/** |
559 |
< |
* Inserts the specified element at the tail of this queue, |
560 |
< |
* waiting up to the specified wait time if necessary for the |
561 |
< |
* element to be received by a consumer invoking {@code take} or |
562 |
< |
* {@code poll}. |
559 |
> |
* Transfers the element to a consumer if it is possible to do so |
560 |
> |
* before the timeout elapses. |
561 |
> |
* |
562 |
> |
* <p>More precisely, transfers the specified element immediately |
563 |
> |
* if there exists a consumer already waiting to receive it (in |
564 |
> |
* {@link #take} or timed {@link #poll(long,TimeUnit) poll}), |
565 |
> |
* else inserts the specified element at the tail of this queue |
566 |
> |
* and waits until the element is received by a consumer, |
567 |
> |
* returning {@code false} if the specified wait time elapses |
568 |
> |
* before the element can be transferred. |
569 |
|
* |
570 |
|
* @throws NullPointerException if the specified element is null |
571 |
|
*/ |