|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
E
- The type of the elements held in this heap.public interface Heap<E>
This interface for Heap, integrated into the java Collection
framwork. Besides basic Collection
operations,
Heap provide additional pop()
, push(E)
, and top()
operations.
AbstractHeap
Method Summary | |
---|---|
E |
pop()
Retrieves and removes the head of this heap if exsits. |
boolean |
push(E o)
Insert the specified element into the heap. |
E |
top()
Retrieves but doesn't remove the head of this heap, or null if this heap is empty. |
Methods inherited from interface java.util.Collection |
---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Method Detail |
---|
E pop()
E top()
boolean push(E o)
Collection.add(E)
.
o
- the element to insert
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |