|
![]() SandMark version 3.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--sandmark.obfuscate.loop.PriorityQueue
A small modification of a LinkedList to make a priority queue. The priorities are defined by the compareTo method (in Comparable), but duplicates are allowed.
| Constructor Summary | |
PriorityQueue()
|
|
| Method Summary | |
void |
add(java.lang.Comparable c)
Adds an object to the queue, behind the last object with priority less than or equal to its priority. |
java.lang.Comparable |
dequeue()
|
boolean |
isEmpty()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PriorityQueue()
| Method Detail |
public void add(java.lang.Comparable c)
c - the object to add - must implement comparablepublic java.lang.Comparable dequeue()
public boolean isEmpty()
|
SandMark version 3.0 Wed Jan 29 10:30:05 MST 2003 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||