scolebourne 2004/01/01 11:00:20 Modified: collections/src/java/org/apache/commons/collections BinaryHeap.java Log: Undeprecate, as is only implementation of PriorityQueue Revision Changes Path 1.16 +19 -15 jakarta-commons/collections/src/java/org/apache/commons/collections/BinaryHeap.java Index: BinaryHeap.java =================================================================== RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/BinaryHeap.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- BinaryHeap.java 29 Nov 2003 18:04:57 -0000 1.15 +++ BinaryHeap.java 1 Jan 2004 19:00:20 -0000 1.16 @@ -63,36 +63,40 @@ import java.util.NoSuchElementException; /** - * Binary heap implementation of [EMAIL PROTECTED] PriorityQueue} and [EMAIL PROTECTED] Buffer}. + * Binary heap implementation of <code>PriorityQueue</code>. + * <p> + * The <code>PriorityQueue</code> interface has now been replaced for most uses + * by the <code>Buffer</code> interface. This class and the interface are + * retained for backwards compatability. The intended replacement is + * [EMAIL PROTECTED] org.apache.commons.collections.buffer.BinaryBuffer BinaryBuffer}. * <p> * The removal order of a binary heap is based on either the natural sort * order of its elements or a specified [EMAIL PROTECTED] Comparator}. The - * [EMAIL PROTECTED] #remove()} method always returns the first element as determined + * [EMAIL PROTECTED] #pop()} method always returns the first element as determined * by the sort order. (The <code>isMinHeap</code> flag in the constructors - * can be used to reverse the sort order, in which case [EMAIL PROTECTED] #remove()} + * can be used to reverse the sort order, in which case [EMAIL PROTECTED] #pop()} * will always remove the last element.) The removal order is * <i>not</i> the same as the order of iteration; elements are * returned by the iterator in no particular order. * <p> - * The [EMAIL PROTECTED] #add(Object)} and [EMAIL PROTECTED] #remove()} operations perform - * in logarithmic time. The [EMAIL PROTECTED] #get()} operation performs in constant + * The [EMAIL PROTECTED] #insert(Object)} and [EMAIL PROTECTED] #pop()} operations perform + * in logarithmic time. The [EMAIL PROTECTED] #peek()} operation performs in constant * time. All other operations perform in linear time or worse. * <p> * Note that this implementation is not synchronized. Use - * [EMAIL PROTECTED] BufferUtils#synchronizedBuffer(Buffer)} to provide - * synchronized access to a <code>BinaryHeap</code>: + * [EMAIL PROTECTED] PriorityQueueUtils#synchronizedPriorityQueue(PriorityQueue)} + * to provide synchronized access to a <code>BinaryHeap</code>: * * <pre> - * Buffer heap = BufferUtils.synchronizedBuffer(new BinaryHeap()); + * PriorityQueue heap = PriorityQueueUtils.synchronizedPriorityQueue(new BinaryHeap()); * </pre> * - * @deprecated Moved to buffer subpackage. Due to be removed in v4.0. * @since Commons Collections 1.0 * @version $Revision$ $Date$ * - * @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a> - * @author <a href="mailto:[EMAIL PROTECTED]">Ram Chidambaram</a> - * @author <a href="mailto:[EMAIL PROTECTED]">Michael A. Smith</a> + * @author Peter Donald + * @author Ram Chidambaram + * @author Michael A. Smith * @author Paul Jack * @author Stephen Colebourne */ @@ -227,7 +231,7 @@ m_comparator = comparator; } - + //----------------------------------------------------------------------- /** * Clears all elements from queue. */
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]