--- jsr166/src/main/java/util/PriorityQueue.java 2003/09/13 18:51:06 1.41 +++ jsr166/src/main/java/util/PriorityQueue.java 2003/10/19 13:38:29 1.45 @@ -14,14 +14,16 @@ package java.util; * natural order (see {@link Comparable}), or according to a * {@link java.util.Comparator}, depending on which constructor is * used. A priority queue does not permit null elements. + * A priority queue relying on natural ordering also does not + * permit insertion of non-comparable objects (doing so may result + * in ClassCastException). * *
The head of this queue is the least element * with respect to the specified ordering. If multiple elements are * tied for least value, the head is one of those elements -- ties are - * broken arbitrarily. The {@link #remove()} and {@link #poll()} - * methods remove and return the head of the queue, and the {@link - * #element()} and {@link #peek()} methods return, but do not delete, - * the head of the queue. + * broken arbitrarily. The queue retrieval operations poll, + * remove, peek, and element access the + * element at the head of the queue. * *
A priority queue is unbounded, but has an internal
* capacity governing the size of an array used to store the
@@ -57,6 +59,7 @@ package java.util;
* @since 1.5
* @version %I%, %G%
* @author Josh Bloch
+ * @param
- * This implementation iterates over the specified collection, and adds
- * each object returned by the iterator to this collection, in turn.
- * @param c collection whose elements are to be added to this queue
- * @return true if this queue changed as a result of the
- * call.
- * @throws NullPointerException if c or any element in c
- * is null
- * @throws ClassCastException if any element cannot be compared
- * with elements currently in the priority queue according
- * to the priority queue's ordering.
- */
- public boolean addAll(Collection extends E> c) {
- return super.addAll(c);
- }
-
public boolean remove(Object o) {
if (o == null)
return false;