a whole bunch of stuff
[ephemerata.git] / KezvhLib / lib / org.apache.commons.collections / apidocs / org / apache / commons / collections / BinaryHeap.html
blob8f393f7e99d0e429ec330709b2b940153bcce44c
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <!--NewPage-->
3 <HTML>
4 <HEAD>
5 <!-- Generated by javadoc (build 1.5.0_07) on Fri Apr 11 15:39:16 BST 2008 -->
6 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
7 <TITLE>
8 BinaryHeap (Commons Collections 3.2.1 API)
9 </TITLE>
11 <META NAME="keywords" CONTENT="org.apache.commons.collections.BinaryHeap class">
13 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
15 <SCRIPT type="text/javascript">
16 function windowTitle()
18 parent.document.title="BinaryHeap (Commons Collections 3.2.1 API)";
20 </SCRIPT>
21 <NOSCRIPT>
22 </NOSCRIPT>
24 </HEAD>
26 <BODY BGCOLOR="white" onload="windowTitle();">
29 <!-- ========= START OF TOP NAVBAR ======= -->
30 <A NAME="navbar_top"><!-- --></A>
31 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
32 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
33 <TR>
34 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
35 <A NAME="navbar_top_firstrow"><!-- --></A>
36 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
37 <TR ALIGN="center" VALIGN="top">
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
40 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BinaryHeap.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
46 </TR>
47 </TABLE>
48 </TD>
49 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
50 </EM>
51 </TD>
52 </TR>
54 <TR>
55 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
56 &nbsp;<A HREF="../../../../org/apache/commons/collections/BidiMap.html" title="interface in org.apache.commons.collections"><B>PREV CLASS</B></A>&nbsp;
57 &nbsp;<A HREF="../../../../org/apache/commons/collections/BoundedCollection.html" title="interface in org.apache.commons.collections"><B>NEXT CLASS</B></A></FONT></TD>
58 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
59 <A HREF="../../../../index.html?org/apache/commons/collections/BinaryHeap.html" target="_top"><B>FRAMES</B></A> &nbsp;
60 &nbsp;<A HREF="BinaryHeap.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
61 &nbsp;<SCRIPT type="text/javascript">
62 <!--
63 if(window==top) {
64 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
66 //-->
67 </SCRIPT>
68 <NOSCRIPT>
69 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
70 </NOSCRIPT>
73 </FONT></TD>
74 </TR>
75 <TR>
76 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
80 </TR>
81 </TABLE>
82 <A NAME="skip-navbar_top"></A>
83 <!-- ========= END OF TOP NAVBAR ========= -->
85 <HR>
86 <!-- ======== START OF CLASS DATA ======== -->
87 <H2>
88 <FONT SIZE="-1">
89 org.apache.commons.collections</FONT>
90 <BR>
91 Class BinaryHeap</H2>
92 <PRE>
93 java.lang.Object
94 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by ">java.util.AbstractCollection
95 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.collections.BinaryHeap</B>
96 </PRE>
97 <DL>
98 <DT><B>All Implemented Interfaces:</B> <DD>java.lang.Iterable, java.util.Collection, <A HREF="../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A>, <A HREF="../../../../org/apache/commons/collections/PriorityQueue.html" title="interface in org.apache.commons.collections">PriorityQueue</A></DD>
99 </DL>
100 <HR>
101 <B>Deprecated.</B>&nbsp;<I>Replaced by PriorityBuffer in buffer subpackage.
102 Due to be removed in v4.0.</I>
104 <DL>
105 <DT><PRE>public final class <B>BinaryHeap</B><DT>extends java.util.AbstractCollection<DT>implements <A HREF="../../../../org/apache/commons/collections/PriorityQueue.html" title="interface in org.apache.commons.collections">PriorityQueue</A>, <A HREF="../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A></DL>
106 </PRE>
109 Binary heap implementation of <code>PriorityQueue</code>.
111 The <code>PriorityQueue</code> interface has now been replaced for most uses
112 by the <code>Buffer</code> interface. This class and the interface are
113 retained for backwards compatibility. The intended replacement is
114 <A HREF="../../../../org/apache/commons/collections/buffer/PriorityBuffer.html" title="class in org.apache.commons.collections.buffer"><CODE>PriorityBuffer</CODE></A>.
116 The removal order of a binary heap is based on either the natural sort
117 order of its elements or a specified <CODE>Comparator</CODE>. The
118 <A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#pop()"><CODE>pop()</CODE></A> method always returns the first element as determined
119 by the sort order. (The <code>isMinHeap</code> flag in the constructors
120 can be used to reverse the sort order, in which case <A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#pop()"><CODE>pop()</CODE></A>
121 will always remove the last element.) The removal order is
122 <i>not</i> the same as the order of iteration; elements are
123 returned by the iterator in no particular order.
125 The <A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#insert(java.lang.Object)"><CODE>insert(Object)</CODE></A> and <A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#pop()"><CODE>pop()</CODE></A> operations perform
126 in logarithmic time. The <A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#peek()"><CODE>peek()</CODE></A> operation performs in constant
127 time. All other operations perform in linear time or worse.
129 Note that this implementation is not synchronized. Use SynchronizedPriorityQueue
130 to provide synchronized access to a <code>BinaryHeap</code>:
132 <pre>
133 PriorityQueue heap = new SynchronizedPriorityQueue(new BinaryHeap());
134 </pre>
138 <DL>
139 <DT><B>Since:</B></DT>
140 <DD>Commons Collections 1.0</DD>
141 <DT><B>Version:</B></DT>
142 <DD>$Revision: 646777 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $</DD>
143 <DT><B>Author:</B></DT>
144 <DD>Peter Donald, Ram Chidambaram, Michael A. Smith, Paul Jack, Stephen Colebourne</DD>
145 </DL>
146 <HR>
150 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
152 <A NAME="constructor_summary"><!-- --></A>
153 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
154 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
155 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
156 <B>Constructor Summary</B></FONT></TH>
157 </TR>
158 <TR BGCOLOR="white" CLASS="TableRowColor">
159 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#BinaryHeap()">BinaryHeap</A></B>()</CODE>
161 <BR>
162 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Constructs a new minimum binary heap.</TD>
163 </TR>
164 <TR BGCOLOR="white" CLASS="TableRowColor">
165 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#BinaryHeap(boolean)">BinaryHeap</A></B>(boolean&nbsp;isMinHeap)</CODE>
167 <BR>
168 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Constructs a new minimum or maximum binary heap</TD>
169 </TR>
170 <TR BGCOLOR="white" CLASS="TableRowColor">
171 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#BinaryHeap(boolean, java.util.Comparator)">BinaryHeap</A></B>(boolean&nbsp;isMinHeap,
172 java.util.Comparator&nbsp;comparator)</CODE>
174 <BR>
175 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Constructs a new <code>BinaryHeap</code>.</TD>
176 </TR>
177 <TR BGCOLOR="white" CLASS="TableRowColor">
178 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#BinaryHeap(java.util.Comparator)">BinaryHeap</A></B>(java.util.Comparator&nbsp;comparator)</CODE>
180 <BR>
181 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Constructs a new <code>BinaryHeap</code> that will use the given
182 comparator to order its elements.</TD>
183 </TR>
184 <TR BGCOLOR="white" CLASS="TableRowColor">
185 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#BinaryHeap(int)">BinaryHeap</A></B>(int&nbsp;capacity)</CODE>
187 <BR>
188 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Constructs a new minimum binary heap with the specified initial capacity.</TD>
189 </TR>
190 <TR BGCOLOR="white" CLASS="TableRowColor">
191 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#BinaryHeap(int, boolean)">BinaryHeap</A></B>(int&nbsp;capacity,
192 boolean&nbsp;isMinHeap)</CODE>
194 <BR>
195 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Constructs a new minimum or maximum binary heap with the specified
196 initial capacity.</TD>
197 </TR>
198 <TR BGCOLOR="white" CLASS="TableRowColor">
199 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#BinaryHeap(int, boolean, java.util.Comparator)">BinaryHeap</A></B>(int&nbsp;capacity,
200 boolean&nbsp;isMinHeap,
201 java.util.Comparator&nbsp;comparator)</CODE>
203 <BR>
204 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Constructs a new <code>BinaryHeap</code>.</TD>
205 </TR>
206 <TR BGCOLOR="white" CLASS="TableRowColor">
207 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#BinaryHeap(int, java.util.Comparator)">BinaryHeap</A></B>(int&nbsp;capacity,
208 java.util.Comparator&nbsp;comparator)</CODE>
210 <BR>
211 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Constructs a new <code>BinaryHeap</code>.</TD>
212 </TR>
213 </TABLE>
214 &nbsp;
215 <!-- ========== METHOD SUMMARY =========== -->
217 <A NAME="method_summary"><!-- --></A>
218 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
219 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
220 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
221 <B>Method Summary</B></FONT></TH>
222 </TR>
223 <TR BGCOLOR="white" CLASS="TableRowColor">
224 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
225 <CODE>&nbsp;boolean</CODE></FONT></TD>
226 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#add(java.lang.Object)">add</A></B>(java.lang.Object&nbsp;object)</CODE>
228 <BR>
229 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Adds an object to this heap.</TD>
230 </TR>
231 <TR BGCOLOR="white" CLASS="TableRowColor">
232 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
233 <CODE>&nbsp;void</CODE></FONT></TD>
234 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#clear()">clear</A></B>()</CODE>
236 <BR>
237 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Clears all elements from queue.</TD>
238 </TR>
239 <TR BGCOLOR="white" CLASS="TableRowColor">
240 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
241 <CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
242 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#get()">get</A></B>()</CODE>
244 <BR>
245 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Returns the priority element.</TD>
246 </TR>
247 <TR BGCOLOR="white" CLASS="TableRowColor">
248 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
249 <CODE>protected &nbsp;void</CODE></FONT></TD>
250 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#grow()">grow</A></B>()</CODE>
252 <BR>
253 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Increases the size of the heap to support additional elements</TD>
254 </TR>
255 <TR BGCOLOR="white" CLASS="TableRowColor">
256 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
257 <CODE>&nbsp;void</CODE></FONT></TD>
258 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#insert(java.lang.Object)">insert</A></B>(java.lang.Object&nbsp;element)</CODE>
260 <BR>
261 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Inserts an element into queue.</TD>
262 </TR>
263 <TR BGCOLOR="white" CLASS="TableRowColor">
264 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
265 <CODE>&nbsp;boolean</CODE></FONT></TD>
266 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#isEmpty()">isEmpty</A></B>()</CODE>
268 <BR>
269 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Tests if queue is empty.</TD>
270 </TR>
271 <TR BGCOLOR="white" CLASS="TableRowColor">
272 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
273 <CODE>&nbsp;boolean</CODE></FONT></TD>
274 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#isFull()">isFull</A></B>()</CODE>
276 <BR>
277 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Tests if queue is full.</TD>
278 </TR>
279 <TR BGCOLOR="white" CLASS="TableRowColor">
280 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
281 <CODE>&nbsp;java.util.Iterator</CODE></FONT></TD>
282 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#iterator()">iterator</A></B>()</CODE>
284 <BR>
285 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Returns an iterator over this heap's elements.</TD>
286 </TR>
287 <TR BGCOLOR="white" CLASS="TableRowColor">
288 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
289 <CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
290 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#peek()">peek</A></B>()</CODE>
292 <BR>
293 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Returns the element on top of heap but don't remove it.</TD>
294 </TR>
295 <TR BGCOLOR="white" CLASS="TableRowColor">
296 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
297 <CODE>protected &nbsp;void</CODE></FONT></TD>
298 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#percolateDownMaxHeap(int)">percolateDownMaxHeap</A></B>(int&nbsp;index)</CODE>
300 <BR>
301 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Percolates element down heap from the position given by the index.</TD>
302 </TR>
303 <TR BGCOLOR="white" CLASS="TableRowColor">
304 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
305 <CODE>protected &nbsp;void</CODE></FONT></TD>
306 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#percolateDownMinHeap(int)">percolateDownMinHeap</A></B>(int&nbsp;index)</CODE>
308 <BR>
309 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Percolates element down heap from the position given by the index.</TD>
310 </TR>
311 <TR BGCOLOR="white" CLASS="TableRowColor">
312 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
313 <CODE>protected &nbsp;void</CODE></FONT></TD>
314 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#percolateUpMaxHeap(int)">percolateUpMaxHeap</A></B>(int&nbsp;index)</CODE>
316 <BR>
317 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Percolates element up heap from from the position given by the index.</TD>
318 </TR>
319 <TR BGCOLOR="white" CLASS="TableRowColor">
320 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
321 <CODE>protected &nbsp;void</CODE></FONT></TD>
322 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#percolateUpMaxHeap(java.lang.Object)">percolateUpMaxHeap</A></B>(java.lang.Object&nbsp;element)</CODE>
324 <BR>
325 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Percolates a new element up heap from the bottom.</TD>
326 </TR>
327 <TR BGCOLOR="white" CLASS="TableRowColor">
328 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
329 <CODE>protected &nbsp;void</CODE></FONT></TD>
330 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#percolateUpMinHeap(int)">percolateUpMinHeap</A></B>(int&nbsp;index)</CODE>
332 <BR>
333 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Percolates element up heap from the position given by the index.</TD>
334 </TR>
335 <TR BGCOLOR="white" CLASS="TableRowColor">
336 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
337 <CODE>protected &nbsp;void</CODE></FONT></TD>
338 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#percolateUpMinHeap(java.lang.Object)">percolateUpMinHeap</A></B>(java.lang.Object&nbsp;element)</CODE>
340 <BR>
341 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Percolates a new element up heap from the bottom.</TD>
342 </TR>
343 <TR BGCOLOR="white" CLASS="TableRowColor">
344 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
345 <CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
346 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#pop()">pop</A></B>()</CODE>
348 <BR>
349 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Returns the element on top of heap and remove it.</TD>
350 </TR>
351 <TR BGCOLOR="white" CLASS="TableRowColor">
352 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
353 <CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
354 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#remove()">remove</A></B>()</CODE>
356 <BR>
357 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Removes the priority element.</TD>
358 </TR>
359 <TR BGCOLOR="white" CLASS="TableRowColor">
360 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
361 <CODE>&nbsp;int</CODE></FONT></TD>
362 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#size()">size</A></B>()</CODE>
364 <BR>
365 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Returns the number of elements in this heap.</TD>
366 </TR>
367 <TR BGCOLOR="white" CLASS="TableRowColor">
368 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
369 <CODE>&nbsp;java.lang.String</CODE></FONT></TD>
370 <TD><CODE><B><A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#toString()">toString</A></B>()</CODE>
372 <BR>
373 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Returns a string representation of this heap.</TD>
374 </TR>
375 </TABLE>
376 &nbsp;<A NAME="methods_inherited_from_class_java.util.AbstractCollection"><!-- --></A>
377 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
378 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
379 <TH ALIGN="left"><B>Methods inherited from class java.util.AbstractCollection</B></TH>
380 </TR>
381 <TR BGCOLOR="white" CLASS="TableRowColor">
382 <TD><CODE>addAll, contains, containsAll, remove, removeAll, retainAll, toArray, toArray</CODE></TD>
383 </TR>
384 </TABLE>
385 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
386 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
387 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
388 <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
389 </TR>
390 <TR BGCOLOR="white" CLASS="TableRowColor">
391 <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
392 </TR>
393 </TABLE>
394 &nbsp;<A NAME="methods_inherited_from_class_java.util.Collection"><!-- --></A>
395 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
396 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
397 <TH ALIGN="left"><B>Methods inherited from interface java.util.Collection</B></TH>
398 </TR>
399 <TR BGCOLOR="white" CLASS="TableRowColor">
400 <TD><CODE>addAll, contains, containsAll, equals, hashCode, remove, removeAll, retainAll, toArray, toArray</CODE></TD>
401 </TR>
402 </TABLE>
403 &nbsp;
406 <!-- ========= CONSTRUCTOR DETAIL ======== -->
408 <A NAME="constructor_detail"><!-- --></A>
409 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
410 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
411 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
412 <B>Constructor Detail</B></FONT></TH>
413 </TR>
414 </TABLE>
416 <A NAME="BinaryHeap()"><!-- --></A><H3>
417 BinaryHeap</H3>
418 <PRE>
419 public <B>BinaryHeap</B>()</PRE>
420 <DL>
421 <DD><B>Deprecated.</B>&nbsp;<DD>Constructs a new minimum binary heap.
423 </DL>
424 <HR>
426 <A NAME="BinaryHeap(java.util.Comparator)"><!-- --></A><H3>
427 BinaryHeap</H3>
428 <PRE>
429 public <B>BinaryHeap</B>(java.util.Comparator&nbsp;comparator)</PRE>
430 <DL>
431 <DD><B>Deprecated.</B>&nbsp;<DD>Constructs a new <code>BinaryHeap</code> that will use the given
432 comparator to order its elements.
434 <DL>
435 <DT><B>Parameters:</B><DD><CODE>comparator</CODE> - the comparator used to order the elements, null
436 means use natural order</DL>
437 </DL>
438 <HR>
440 <A NAME="BinaryHeap(int)"><!-- --></A><H3>
441 BinaryHeap</H3>
442 <PRE>
443 public <B>BinaryHeap</B>(int&nbsp;capacity)</PRE>
444 <DL>
445 <DD><B>Deprecated.</B>&nbsp;<DD>Constructs a new minimum binary heap with the specified initial capacity.
447 <DL>
448 <DT><B>Parameters:</B><DD><CODE>capacity</CODE> - The initial capacity for the heap. This value must
449 be greater than zero.
450 <DT><B>Throws:</B>
451 <DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>capacity</code> is &lt;= <code>0</code></DL>
452 </DL>
453 <HR>
455 <A NAME="BinaryHeap(int, java.util.Comparator)"><!-- --></A><H3>
456 BinaryHeap</H3>
457 <PRE>
458 public <B>BinaryHeap</B>(int&nbsp;capacity,
459 java.util.Comparator&nbsp;comparator)</PRE>
460 <DL>
461 <DD><B>Deprecated.</B>&nbsp;<DD>Constructs a new <code>BinaryHeap</code>.
463 <DL>
464 <DT><B>Parameters:</B><DD><CODE>capacity</CODE> - the initial capacity for the heap<DD><CODE>comparator</CODE> - the comparator used to order the elements, null
465 means use natural order
466 <DT><B>Throws:</B>
467 <DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>capacity</code> is &lt;= <code>0</code></DL>
468 </DL>
469 <HR>
471 <A NAME="BinaryHeap(boolean)"><!-- --></A><H3>
472 BinaryHeap</H3>
473 <PRE>
474 public <B>BinaryHeap</B>(boolean&nbsp;isMinHeap)</PRE>
475 <DL>
476 <DD><B>Deprecated.</B>&nbsp;<DD>Constructs a new minimum or maximum binary heap
478 <DL>
479 <DT><B>Parameters:</B><DD><CODE>isMinHeap</CODE> - if <code>true</code> the heap is created as a
480 minimum heap; otherwise, the heap is created as a maximum heap</DL>
481 </DL>
482 <HR>
484 <A NAME="BinaryHeap(boolean, java.util.Comparator)"><!-- --></A><H3>
485 BinaryHeap</H3>
486 <PRE>
487 public <B>BinaryHeap</B>(boolean&nbsp;isMinHeap,
488 java.util.Comparator&nbsp;comparator)</PRE>
489 <DL>
490 <DD><B>Deprecated.</B>&nbsp;<DD>Constructs a new <code>BinaryHeap</code>.
492 <DL>
493 <DT><B>Parameters:</B><DD><CODE>isMinHeap</CODE> - true to use the order imposed by the given
494 comparator; false to reverse that order<DD><CODE>comparator</CODE> - the comparator used to order the elements, null
495 means use natural order</DL>
496 </DL>
497 <HR>
499 <A NAME="BinaryHeap(int, boolean)"><!-- --></A><H3>
500 BinaryHeap</H3>
501 <PRE>
502 public <B>BinaryHeap</B>(int&nbsp;capacity,
503 boolean&nbsp;isMinHeap)</PRE>
504 <DL>
505 <DD><B>Deprecated.</B>&nbsp;<DD>Constructs a new minimum or maximum binary heap with the specified
506 initial capacity.
508 <DL>
509 <DT><B>Parameters:</B><DD><CODE>capacity</CODE> - the initial capacity for the heap. This value must
510 be greater than zero.<DD><CODE>isMinHeap</CODE> - if <code>true</code> the heap is created as a
511 minimum heap; otherwise, the heap is created as a maximum heap.
512 <DT><B>Throws:</B>
513 <DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>capacity</code> is <code>&lt;= 0</code></DL>
514 </DL>
515 <HR>
517 <A NAME="BinaryHeap(int, boolean, java.util.Comparator)"><!-- --></A><H3>
518 BinaryHeap</H3>
519 <PRE>
520 public <B>BinaryHeap</B>(int&nbsp;capacity,
521 boolean&nbsp;isMinHeap,
522 java.util.Comparator&nbsp;comparator)</PRE>
523 <DL>
524 <DD><B>Deprecated.</B>&nbsp;<DD>Constructs a new <code>BinaryHeap</code>.
526 <DL>
527 <DT><B>Parameters:</B><DD><CODE>capacity</CODE> - the initial capacity for the heap<DD><CODE>isMinHeap</CODE> - true to use the order imposed by the given
528 comparator; false to reverse that order<DD><CODE>comparator</CODE> - the comparator used to order the elements, null
529 means use natural order
530 <DT><B>Throws:</B>
531 <DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>capacity</code> is <code>&lt;= 0</code></DL>
532 </DL>
534 <!-- ============ METHOD DETAIL ========== -->
536 <A NAME="method_detail"><!-- --></A>
537 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
538 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
539 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
540 <B>Method Detail</B></FONT></TH>
541 </TR>
542 </TABLE>
544 <A NAME="clear()"><!-- --></A><H3>
545 clear</H3>
546 <PRE>
547 public void <B>clear</B>()</PRE>
548 <DL>
549 <DD><B>Deprecated.</B>&nbsp;<DD>Clears all elements from queue.
551 <DD><DL>
552 <DT><B>Specified by:</B><DD><CODE>clear</CODE> in interface <CODE>java.util.Collection</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/commons/collections/PriorityQueue.html#clear()">clear</A></CODE> in interface <CODE><A HREF="../../../../org/apache/commons/collections/PriorityQueue.html" title="interface in org.apache.commons.collections">PriorityQueue</A></CODE><DT><B>Overrides:</B><DD><CODE>clear</CODE> in class <CODE>java.util.AbstractCollection</CODE></DL>
553 </DD>
554 <DD><DL>
555 </DL>
556 </DD>
557 </DL>
558 <HR>
560 <A NAME="isEmpty()"><!-- --></A><H3>
561 isEmpty</H3>
562 <PRE>
563 public boolean <B>isEmpty</B>()</PRE>
564 <DL>
565 <DD><B>Deprecated.</B>&nbsp;<DD>Tests if queue is empty.
567 <DD><DL>
568 <DT><B>Specified by:</B><DD><CODE>isEmpty</CODE> in interface <CODE>java.util.Collection</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/commons/collections/PriorityQueue.html#isEmpty()">isEmpty</A></CODE> in interface <CODE><A HREF="../../../../org/apache/commons/collections/PriorityQueue.html" title="interface in org.apache.commons.collections">PriorityQueue</A></CODE><DT><B>Overrides:</B><DD><CODE>isEmpty</CODE> in class <CODE>java.util.AbstractCollection</CODE></DL>
569 </DD>
570 <DD><DL>
572 <DT><B>Returns:</B><DD><code>true</code> if queue is empty; <code>false</code>
573 otherwise.</DL>
574 </DD>
575 </DL>
576 <HR>
578 <A NAME="isFull()"><!-- --></A><H3>
579 isFull</H3>
580 <PRE>
581 public boolean <B>isFull</B>()</PRE>
582 <DL>
583 <DD><B>Deprecated.</B>&nbsp;<DD>Tests if queue is full.
585 <DD><DL>
586 </DL>
587 </DD>
588 <DD><DL>
590 <DT><B>Returns:</B><DD><code>true</code> if queue is full; <code>false</code>
591 otherwise.</DL>
592 </DD>
593 </DL>
594 <HR>
596 <A NAME="insert(java.lang.Object)"><!-- --></A><H3>
597 insert</H3>
598 <PRE>
599 public void <B>insert</B>(java.lang.Object&nbsp;element)</PRE>
600 <DL>
601 <DD><B>Deprecated.</B>&nbsp;<DD>Inserts an element into queue.
603 <DD><DL>
604 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/commons/collections/PriorityQueue.html#insert(java.lang.Object)">insert</A></CODE> in interface <CODE><A HREF="../../../../org/apache/commons/collections/PriorityQueue.html" title="interface in org.apache.commons.collections">PriorityQueue</A></CODE></DL>
605 </DD>
606 <DD><DL>
607 <DT><B>Parameters:</B><DD><CODE>element</CODE> - the element to be inserted</DL>
608 </DD>
609 </DL>
610 <HR>
612 <A NAME="peek()"><!-- --></A><H3>
613 peek</H3>
614 <PRE>
615 public java.lang.Object <B>peek</B>()
616 throws java.util.NoSuchElementException</PRE>
617 <DL>
618 <DD><B>Deprecated.</B>&nbsp;<DD>Returns the element on top of heap but don't remove it.
620 <DD><DL>
621 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/commons/collections/PriorityQueue.html#peek()">peek</A></CODE> in interface <CODE><A HREF="../../../../org/apache/commons/collections/PriorityQueue.html" title="interface in org.apache.commons.collections">PriorityQueue</A></CODE></DL>
622 </DD>
623 <DD><DL>
625 <DT><B>Returns:</B><DD>the element at top of heap
626 <DT><B>Throws:</B>
627 <DD><CODE>java.util.NoSuchElementException</CODE> - if <code>isEmpty() == true</code></DL>
628 </DD>
629 </DL>
630 <HR>
632 <A NAME="pop()"><!-- --></A><H3>
633 pop</H3>
634 <PRE>
635 public java.lang.Object <B>pop</B>()
636 throws java.util.NoSuchElementException</PRE>
637 <DL>
638 <DD><B>Deprecated.</B>&nbsp;<DD>Returns the element on top of heap and remove it.
640 <DD><DL>
641 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/commons/collections/PriorityQueue.html#pop()">pop</A></CODE> in interface <CODE><A HREF="../../../../org/apache/commons/collections/PriorityQueue.html" title="interface in org.apache.commons.collections">PriorityQueue</A></CODE></DL>
642 </DD>
643 <DD><DL>
645 <DT><B>Returns:</B><DD>the element at top of heap
646 <DT><B>Throws:</B>
647 <DD><CODE>java.util.NoSuchElementException</CODE> - if <code>isEmpty() == true</code></DL>
648 </DD>
649 </DL>
650 <HR>
652 <A NAME="percolateDownMinHeap(int)"><!-- --></A><H3>
653 percolateDownMinHeap</H3>
654 <PRE>
655 protected void <B>percolateDownMinHeap</B>(int&nbsp;index)</PRE>
656 <DL>
657 <DD><B>Deprecated.</B>&nbsp;<DD>Percolates element down heap from the position given by the index.
659 Assumes it is a minimum heap.
661 <DD><DL>
662 </DL>
663 </DD>
664 <DD><DL>
665 <DT><B>Parameters:</B><DD><CODE>index</CODE> - the index for the element</DL>
666 </DD>
667 </DL>
668 <HR>
670 <A NAME="percolateDownMaxHeap(int)"><!-- --></A><H3>
671 percolateDownMaxHeap</H3>
672 <PRE>
673 protected void <B>percolateDownMaxHeap</B>(int&nbsp;index)</PRE>
674 <DL>
675 <DD><B>Deprecated.</B>&nbsp;<DD>Percolates element down heap from the position given by the index.
677 Assumes it is a maximum heap.
679 <DD><DL>
680 </DL>
681 </DD>
682 <DD><DL>
683 <DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the element</DL>
684 </DD>
685 </DL>
686 <HR>
688 <A NAME="percolateUpMinHeap(int)"><!-- --></A><H3>
689 percolateUpMinHeap</H3>
690 <PRE>
691 protected void <B>percolateUpMinHeap</B>(int&nbsp;index)</PRE>
692 <DL>
693 <DD><B>Deprecated.</B>&nbsp;<DD>Percolates element up heap from the position given by the index.
695 Assumes it is a minimum heap.
697 <DD><DL>
698 </DL>
699 </DD>
700 <DD><DL>
701 <DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the element to be percolated up</DL>
702 </DD>
703 </DL>
704 <HR>
706 <A NAME="percolateUpMinHeap(java.lang.Object)"><!-- --></A><H3>
707 percolateUpMinHeap</H3>
708 <PRE>
709 protected void <B>percolateUpMinHeap</B>(java.lang.Object&nbsp;element)</PRE>
710 <DL>
711 <DD><B>Deprecated.</B>&nbsp;<DD>Percolates a new element up heap from the bottom.
713 Assumes it is a minimum heap.
715 <DD><DL>
716 </DL>
717 </DD>
718 <DD><DL>
719 <DT><B>Parameters:</B><DD><CODE>element</CODE> - the element</DL>
720 </DD>
721 </DL>
722 <HR>
724 <A NAME="percolateUpMaxHeap(int)"><!-- --></A><H3>
725 percolateUpMaxHeap</H3>
726 <PRE>
727 protected void <B>percolateUpMaxHeap</B>(int&nbsp;index)</PRE>
728 <DL>
729 <DD><B>Deprecated.</B>&nbsp;<DD>Percolates element up heap from from the position given by the index.
731 Assume it is a maximum heap.
733 <DD><DL>
734 </DL>
735 </DD>
736 <DD><DL>
737 <DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the element to be percolated up</DL>
738 </DD>
739 </DL>
740 <HR>
742 <A NAME="percolateUpMaxHeap(java.lang.Object)"><!-- --></A><H3>
743 percolateUpMaxHeap</H3>
744 <PRE>
745 protected void <B>percolateUpMaxHeap</B>(java.lang.Object&nbsp;element)</PRE>
746 <DL>
747 <DD><B>Deprecated.</B>&nbsp;<DD>Percolates a new element up heap from the bottom.
749 Assume it is a maximum heap.
751 <DD><DL>
752 </DL>
753 </DD>
754 <DD><DL>
755 <DT><B>Parameters:</B><DD><CODE>element</CODE> - the element</DL>
756 </DD>
757 </DL>
758 <HR>
760 <A NAME="grow()"><!-- --></A><H3>
761 grow</H3>
762 <PRE>
763 protected void <B>grow</B>()</PRE>
764 <DL>
765 <DD><B>Deprecated.</B>&nbsp;<DD>Increases the size of the heap to support additional elements
767 <DD><DL>
768 </DL>
769 </DD>
770 <DD><DL>
771 </DL>
772 </DD>
773 </DL>
774 <HR>
776 <A NAME="toString()"><!-- --></A><H3>
777 toString</H3>
778 <PRE>
779 public java.lang.String <B>toString</B>()</PRE>
780 <DL>
781 <DD><B>Deprecated.</B>&nbsp;<DD>Returns a string representation of this heap. The returned string
782 is similar to those produced by standard JDK collections.
784 <DD><DL>
785 <DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.util.AbstractCollection</CODE></DL>
786 </DD>
787 <DD><DL>
789 <DT><B>Returns:</B><DD>a string representation of this heap</DL>
790 </DD>
791 </DL>
792 <HR>
794 <A NAME="iterator()"><!-- --></A><H3>
795 iterator</H3>
796 <PRE>
797 public java.util.Iterator <B>iterator</B>()</PRE>
798 <DL>
799 <DD><B>Deprecated.</B>&nbsp;<DD>Returns an iterator over this heap's elements.
801 <DD><DL>
802 <DT><B>Specified by:</B><DD><CODE>iterator</CODE> in interface <CODE>java.lang.Iterable</CODE><DT><B>Specified by:</B><DD><CODE>iterator</CODE> in interface <CODE>java.util.Collection</CODE><DT><B>Specified by:</B><DD><CODE>iterator</CODE> in class <CODE>java.util.AbstractCollection</CODE></DL>
803 </DD>
804 <DD><DL>
806 <DT><B>Returns:</B><DD>an iterator over this heap's elements</DL>
807 </DD>
808 </DL>
809 <HR>
811 <A NAME="add(java.lang.Object)"><!-- --></A><H3>
812 add</H3>
813 <PRE>
814 public boolean <B>add</B>(java.lang.Object&nbsp;object)</PRE>
815 <DL>
816 <DD><B>Deprecated.</B>&nbsp;<DD>Adds an object to this heap. Same as <A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#insert(java.lang.Object)"><CODE>insert(Object)</CODE></A>.
818 <DD><DL>
819 <DT><B>Specified by:</B><DD><CODE>add</CODE> in interface <CODE>java.util.Collection</CODE><DT><B>Overrides:</B><DD><CODE>add</CODE> in class <CODE>java.util.AbstractCollection</CODE></DL>
820 </DD>
821 <DD><DL>
822 <DT><B>Parameters:</B><DD><CODE>object</CODE> - the object to add
823 <DT><B>Returns:</B><DD>true, always</DL>
824 </DD>
825 </DL>
826 <HR>
828 <A NAME="get()"><!-- --></A><H3>
829 get</H3>
830 <PRE>
831 public java.lang.Object <B>get</B>()</PRE>
832 <DL>
833 <DD><B>Deprecated.</B>&nbsp;<DD>Returns the priority element. Same as <A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#peek()"><CODE>peek()</CODE></A>.
835 <DD><DL>
836 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/commons/collections/Buffer.html#get()">get</A></CODE> in interface <CODE><A HREF="../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A></CODE></DL>
837 </DD>
838 <DD><DL>
840 <DT><B>Returns:</B><DD>the priority element
841 <DT><B>Throws:</B>
842 <DD><CODE><A HREF="../../../../org/apache/commons/collections/BufferUnderflowException.html" title="class in org.apache.commons.collections">BufferUnderflowException</A></CODE> - if this heap is empty</DL>
843 </DD>
844 </DL>
845 <HR>
847 <A NAME="remove()"><!-- --></A><H3>
848 remove</H3>
849 <PRE>
850 public java.lang.Object <B>remove</B>()</PRE>
851 <DL>
852 <DD><B>Deprecated.</B>&nbsp;<DD>Removes the priority element. Same as <A HREF="../../../../org/apache/commons/collections/BinaryHeap.html#pop()"><CODE>pop()</CODE></A>.
854 <DD><DL>
855 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/commons/collections/Buffer.html#remove()">remove</A></CODE> in interface <CODE><A HREF="../../../../org/apache/commons/collections/Buffer.html" title="interface in org.apache.commons.collections">Buffer</A></CODE></DL>
856 </DD>
857 <DD><DL>
859 <DT><B>Returns:</B><DD>the removed priority element
860 <DT><B>Throws:</B>
861 <DD><CODE><A HREF="../../../../org/apache/commons/collections/BufferUnderflowException.html" title="class in org.apache.commons.collections">BufferUnderflowException</A></CODE> - if this heap is empty</DL>
862 </DD>
863 </DL>
864 <HR>
866 <A NAME="size()"><!-- --></A><H3>
867 size</H3>
868 <PRE>
869 public int <B>size</B>()</PRE>
870 <DL>
871 <DD><B>Deprecated.</B>&nbsp;<DD>Returns the number of elements in this heap.
873 <DD><DL>
874 <DT><B>Specified by:</B><DD><CODE>size</CODE> in interface <CODE>java.util.Collection</CODE><DT><B>Specified by:</B><DD><CODE>size</CODE> in class <CODE>java.util.AbstractCollection</CODE></DL>
875 </DD>
876 <DD><DL>
878 <DT><B>Returns:</B><DD>the number of elements in this heap</DL>
879 </DD>
880 </DL>
881 <!-- ========= END OF CLASS DATA ========= -->
882 <HR>
885 <!-- ======= START OF BOTTOM NAVBAR ====== -->
886 <A NAME="navbar_bottom"><!-- --></A>
887 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
888 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
889 <TR>
890 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
891 <A NAME="navbar_bottom_firstrow"><!-- --></A>
892 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
893 <TR ALIGN="center" VALIGN="top">
894 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
895 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
896 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
897 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BinaryHeap.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
898 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
899 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
900 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
901 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
902 </TR>
903 </TABLE>
904 </TD>
905 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
906 </EM>
907 </TD>
908 </TR>
910 <TR>
911 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
912 &nbsp;<A HREF="../../../../org/apache/commons/collections/BidiMap.html" title="interface in org.apache.commons.collections"><B>PREV CLASS</B></A>&nbsp;
913 &nbsp;<A HREF="../../../../org/apache/commons/collections/BoundedCollection.html" title="interface in org.apache.commons.collections"><B>NEXT CLASS</B></A></FONT></TD>
914 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
915 <A HREF="../../../../index.html?org/apache/commons/collections/BinaryHeap.html" target="_top"><B>FRAMES</B></A> &nbsp;
916 &nbsp;<A HREF="BinaryHeap.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
917 &nbsp;<SCRIPT type="text/javascript">
918 <!--
919 if(window==top) {
920 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
922 //-->
923 </SCRIPT>
924 <NOSCRIPT>
925 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
926 </NOSCRIPT>
929 </FONT></TD>
930 </TR>
931 <TR>
932 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
933 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
934 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
935 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
936 </TR>
937 </TABLE>
938 <A NAME="skip-navbar_bottom"></A>
939 <!-- ======== END OF BOTTOM NAVBAR ======= -->
941 <HR>
942 Copyright © 2001-2008 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
943 </BODY>
944 </HTML>