|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.media.mn8.util.cron.SynchronizedHeap
Constructor Summary | |
SynchronizedHeap(BinaryHeap heap)
|
Method Summary | |
void |
clear()
Clear all elements from queue. |
void |
insert(Object element)
Insert an element into queue. |
boolean |
isEmpty()
Test if queue is empty. |
Object |
peek()
Return element on top of heap but don't remove it. |
Object |
pop()
Return element on top of heap and remove it. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SynchronizedHeap(BinaryHeap heap)
Method Detail |
public void clear()
public boolean isEmpty()
public void insert(Object element)
element
- the element to be insertedpublic Object peek() throws NoSuchElementException
NoSuchElementException
- if isEmpty() == truepublic Object pop() throws NoSuchElementException
NoSuchElementException
- if isEmpty() == truepublic String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |