21 |
|
* producer. The <em>tail</em> of the queue is that element that has |
22 |
|
* been on the queue the shortest time for some producer. |
23 |
|
* |
24 |
< |
* <p>Beware that, unlike in most collections, the <tt>size</tt> |
24 |
> |
* <p>Beware that, unlike in most collections, the {@code size} |
25 |
|
* method is <em>NOT</em> a constant-time operation. Because of the |
26 |
|
* asynchronous nature of these queues, determining the current number |
27 |
|
* of elements requires a traversal of the elements. |
402 |
|
} |
403 |
|
|
404 |
|
/** |
405 |
< |
* Creates an initially empty <tt>LinkedTransferQueue</tt>. |
405 |
> |
* Creates an initially empty {@code LinkedTransferQueue}. |
406 |
|
*/ |
407 |
|
public LinkedTransferQueue() { |
408 |
|
QNode dummy = new QNode(null, false); |
412 |
|
} |
413 |
|
|
414 |
|
/** |
415 |
< |
* Creates a <tt>LinkedTransferQueue</tt> |
415 |
> |
* Creates a {@code LinkedTransferQueue} |
416 |
|
* initially containing the elements of the given collection, |
417 |
|
* added in traversal order of the collection's iterator. |
418 |
|
* @param c the collection of elements to initially contain |
655 |
|
|
656 |
|
/** |
657 |
|
* Returns the number of elements in this queue. If this queue |
658 |
< |
* contains more than <tt>Integer.MAX_VALUE</tt> elements, returns |
659 |
< |
* <tt>Integer.MAX_VALUE</tt>. |
658 |
> |
* contains more than {@code Integer.MAX_VALUE} elements, returns |
659 |
> |
* {@code Integer.MAX_VALUE}. |
660 |
|
* |
661 |
|
* <p>Beware that, unlike in most collections, this method is |
662 |
|
* <em>NOT</em> a constant-time operation. Because of the |
697 |
|
/** |
698 |
|
* Save the state to a stream (that is, serialize it). |
699 |
|
* |
700 |
< |
* @serialData All of the elements (each an <tt>E</tt>) in |
700 |
> |
* @serialData All of the elements (each an {@code E}) in |
701 |
|
* the proper order, followed by a null |
702 |
|
* @param s the stream |
703 |
|
*/ |