public interface Heap<T>
Modifier and Type | Method and Description |
---|---|
T |
add(T frn)
Add a new value to the heap, return the new top().
|
void |
clear()
Clear the heap
|
T |
insertWithOverflow(T value)
Insert a new value, returning the overflowen object
NOTE: This method should not be called after invoking pop() |
T |
pop()
Get and remove the top of the Heap
NOTE: Once pop() is called no other add(Object) or
insertWithOverflow(Object) should be called. |
int |
size()
Return the amount of objects currently in the heap
|
T |
top()
Get (But not remove) the top of the Heap
|
T pop()
pop()
is called no other add(Object)
or
insertWithOverflow(Object)
should be called.T top()
T insertWithOverflow(T value)
pop()
T add(T frn)
null
should be returned. pop()
void clear()
int size()
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.