|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.unima.ky.parallel.PriorityQueue
Priority Queue This is a thread unsafe version.
Constructor Summary | |
PriorityQueue()
Constructs a priority queue |
|
PriorityQueue(int initcap)
Constructs a priority queue |
|
PriorityQueue(int initcap,
int capinc)
Constructs a priority queue |
Method Summary | |
int |
capacity()
Returns the capacity of the queue. |
edu.unima.ky.parallel.Rank |
get()
Returns the first object and advance the pointer. |
void |
insert(edu.unima.ky.parallel.Rank obj)
Inserts an object. |
edu.unima.ky.parallel.Rank |
peek()
Returns the first object. |
int |
size()
Returns the size of the queue. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PriorityQueue(int initcap, int capinc)
initcap
- the initial capacitycapinc
- the capcity incrementpublic PriorityQueue(int initcap)
initcap
- the inicial capacitypublic PriorityQueue()
Method Detail |
public int size()
public int capacity()
public void insert(edu.unima.ky.parallel.Rank obj)
public edu.unima.ky.parallel.Rank get() throws java.lang.RuntimeException
java.lang.RuntimeException
public edu.unima.ky.parallel.Rank peek() throws java.lang.RuntimeException
java.lang.RuntimeException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |