--- jsr166/src/main/java/util/Queue.java 2005/05/14 02:11:52 1.29 +++ jsr166/src/main/java/util/Queue.java 2012/11/18 19:33:08 1.37 @@ -1,7 +1,7 @@ /* * Written by Doug Lea with assistance from members of JCP JSR-166 * Expert Group and released to the public domain, as explained at - * http://creativecommons.org/licenses/publicdomain + * http://creativecommons.org/publicdomain/zero/1.0/ */ package java.util; @@ -23,7 +23,7 @@ package java.util; * * * Throws exception - * Special value + * Returns special value * * * Insert @@ -50,7 +50,7 @@ package java.util; * Whatever the ordering used, the head of the queue is that * 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 + * the tail of the queue. Other kinds of queues may use * different placement rules. Every Queue implementation * must specify its ordering properties. * @@ -97,7 +97,7 @@ package java.util; * * *

This interface is a member of the - * + * * Java Collections Framework. * * @see java.util.Collection @@ -120,13 +120,13 @@ public interface Queue extends Collec * if no space is currently available. * * @param e the element to add - * @return true (as per the spec for {@link Collection#add}) + * @return true (as specified by {@link Collection#add}) * @throws IllegalStateException if the element cannot be added at this * time due to capacity restrictions - * @throws NullPointerException if the specified element is null and - * this queue not permit null elements * @throws ClassCastException if the class of the specified element * prevents it from being added to this queue + * @throws NullPointerException if the specified element is null and + * this queue does not permit null elements * @throws IllegalArgumentException if some property of this element * prevents it from being added to this queue */ @@ -135,17 +135,17 @@ public interface Queue extends Collec /** * Inserts the specified element into this queue if it is possible to do * so immediately without violating capacity restrictions. - * When using a capacity-restricted deque, this method is generally + * When using a capacity-restricted queue, this method is generally * preferable to {@link #add}, which can fail to insert an element only * by throwing an exception. * * @param e the element to add * @return true if the element was added to this queue, else * false - * @throws NullPointerException if the specified element is null and - * this queue does not permit null elements * @throws ClassCastException if the class of the specified element * prevents it from being added to this queue + * @throws NullPointerException if the specified element is null and + * this queue does not permit null elements * @throws IllegalArgumentException if some property of this element * prevents it from being added to this queue */ @@ -153,8 +153,8 @@ public interface Queue extends Collec /** * Retrieves and removes the head of this queue. This method differs - * from {@link #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 @@ -171,8 +171,8 @@ public interface Queue extends Collec /** * Retrieves, but does not remove, the head of this queue. This method - * differs from {@link #peek} only in that it throws an exception if - * this queue is empty. + * differs from {@link #peek peek} 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