--- jsr166/src/main/java/util/Queue.java 2016/07/08 20:02:54 1.44 +++ jsr166/src/main/java/util/Queue.java 2017/04/19 23:45:50 1.45 @@ -8,15 +8,14 @@ package java.util; /** * A collection designed for holding elements prior to processing. - * Besides basic {@link java.util.Collection Collection} operations, - * queues provide additional insertion, extraction, and inspection - * operations. Each of these methods exists in two forms: one throws - * an exception if the operation fails, the other returns a special - * value (either {@code null} or {@code false}, depending on the - * operation). The latter form of the insert operation is designed - * specifically for use with capacity-restricted {@code Queue} - * implementations; in most implementations, insert operations cannot - * fail. + * Besides basic {@link Collection} operations, queues provide + * additional insertion, extraction, and inspection operations. + * Each of these methods exists in two forms: one throws an exception + * if the operation fails, the other returns a special value (either + * {@code null} or {@code false}, depending on the operation). The + * latter form of the insert operation is designed specifically for + * use with capacity-restricted {@code Queue} implementations; in most + * implementations, insert operations cannot fail. * * * @@ -27,18 +26,18 @@ package java.util; * * * - * - * + * + * * * * - * - * + * + * * * * - * - * + * + * * *
Summary of Queue methods
Insert{@link Queue#add add(e)}{@link Queue#offer offer(e)}{@link #add(Object) add(e)}{@link #offer(Object) offer(e)}
Remove{@link Queue#remove remove()}{@link Queue#poll poll()}{@link #remove() remove()}{@link #poll() poll()}
Examine{@link Queue#element element()}{@link Queue#peek peek()}{@link #element() element()}{@link #peek() peek()}
* @@ -48,7 +47,7 @@ package java.util; * comparator, or the elements' natural ordering, and LIFO queues (or * stacks) which order the elements LIFO (last-in-first-out). * Whatever the ordering used, the head of the queue is that - * element which would be removed by a call to {@link #remove() } or + * element which would be removed by a call to {@link #remove()} or * {@link #poll()}. In a FIFO queue, all new elements are inserted at * the tail of the queue. Other kinds of queues may use * different placement rules. Every {@code Queue} implementation @@ -144,8 +143,8 @@ public interface Queue extends Collec /** * Retrieves and removes the head of this queue. This method differs - * from {@link #poll poll} only in that it throws an exception if this - * queue is empty. + * from {@link #poll() poll()} only in that it throws an exception if + * this queue is empty. * * @return the head of this queue * @throws NoSuchElementException if this queue is empty