commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections BinaryHeap.java
Date Thu, 01 Jan 2004 19:00:20 GMT
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 {@link PriorityQueue} and {@link 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
  + * {@link 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 {@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 <code>isMinHeap</code> 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 
    * <i>not</i> the same as the order of iteration; elements are
    * returned by the iterator in no particular order.
    * <p>
  - * 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.
    * <p>
    * Note that this implementation is not synchronized.  Use 
  - * {@link BufferUtils#synchronizedBuffer(Buffer)} to provide
  - * synchronized access to a <code>BinaryHeap</code>:
  + * {@link 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:donaldp@apache.org">Peter Donald</a>
  - * @author <a href="mailto:ram.chidambaram@telus.com">Ram Chidambaram</a>
  - * @author <a href="mailto:mas@apache.org">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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message