From 23fcdc1e0adcec177d1c7da3245e9483481a9b24 Mon Sep 17 00:00:00 2001 From: Stephen Colebourne Date: Thu, 1 Jan 2004 19:00:20 +0000 Subject: [PATCH] Undeprecate, as is only implementation of PriorityQueue git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@131490 13f79535-47bb-0310-9956-ffa450edef68 --- .../commons/collections/BinaryHeap.java | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/src/java/org/apache/commons/collections/BinaryHeap.java b/src/java/org/apache/commons/collections/BinaryHeap.java index b9687c167..24a62f37f 100644 --- a/src/java/org/apache/commons/collections/BinaryHeap.java +++ b/src/java/org/apache/commons/collections/BinaryHeap.java @@ -1,5 +1,5 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/BinaryHeap.java,v 1.15 2003/11/29 18:04:57 scolebourne Exp $ + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/BinaryHeap.java,v 1.16 2004/01/01 19:00:20 scolebourne Exp $ * ==================================================================== * * The Apache Software License, Version 1.1 @@ -63,36 +63,40 @@ import java.util.Iterator; import java.util.NoSuchElementException; /** - * Binary heap implementation of {@link PriorityQueue} and {@link Buffer}. + * Binary heap implementation of PriorityQueue. + *

+ * The PriorityQueue interface has now been replaced for most uses + * by the Buffer interface. This class and the interface are + * retained for backwards compatability. The intended replacement is + * {@link org.apache.commons.collections.buffer.BinaryBuffer BinaryBuffer}. *

* The removal order of a binary heap is based on either the natural sort * order of its elements or a specified {@link Comparator}. The - * {@link #remove()} method always returns the first element as determined + * {@link #pop()} method always returns the first element as determined * by the sort order. (The isMinHeap flag in the constructors - * can be used to reverse the sort order, in which case {@link #remove()} + * can be used to reverse the sort order, in which case {@link #pop()} * will always remove the last element.) The removal order is * not the same as the order of iteration; elements are * returned by the iterator in no particular order. *

- * The {@link #add(Object)} and {@link #remove()} operations perform - * in logarithmic time. The {@link #get()} operation performs in constant + * The {@link #insert(Object)} and {@link #pop()} operations perform + * in logarithmic time. The {@link #peek()} operation performs in constant * time. All other operations perform in linear time or worse. *

* Note that this implementation is not synchronized. Use - * {@link BufferUtils#synchronizedBuffer(Buffer)} to provide - * synchronized access to a BinaryHeap: + * {@link PriorityQueueUtils#synchronizedPriorityQueue(PriorityQueue)} + * to provide synchronized access to a BinaryHeap: * *

- * Buffer heap = BufferUtils.synchronizedBuffer(new BinaryHeap());
+ * PriorityQueue heap = PriorityQueueUtils.synchronizedPriorityQueue(new BinaryHeap());
  * 
* - * @deprecated Moved to buffer subpackage. Due to be removed in v4.0. * @since Commons Collections 1.0 - * @version $Revision: 1.15 $ $Date: 2003/11/29 18:04:57 $ + * @version $Revision: 1.16 $ $Date: 2004/01/01 19:00:20 $ * - * @author Peter Donald - * @author Ram Chidambaram - * @author Michael A. Smith + * @author Peter Donald + * @author Ram Chidambaram + * @author Michael A. Smith * @author Paul Jack * @author Stephen Colebourne */ @@ -227,7 +231,7 @@ public final class BinaryHeap extends AbstractCollection m_comparator = comparator; } - + //----------------------------------------------------------------------- /** * Clears all elements from queue. */