|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectpsimjava.Pqueue
public class Pqueue
PsimJ Java package for OO simulation
Object-oriented simulation package, process interaction approach. PsimJ (C)Jose M. Garrido, June 2000, August 2003, 2007
(C) J. M. Garrido. June 2000, 2003, 2004, 2007 Priority queue class for PsimJ.
PsimJ package, process interaction approach to simulation. (C) J. M. Garrido, June 2000, August 2003, 2004, 2007
| Constructor Summary | |
|---|---|
Pqueue(java.lang.String a_name,
int max_prio)
Initializes priority queue object with title and maximum priority to use. |
|
Pqueue(java.lang.String a_name,
int max_prio,
int maxsize)
Initializes priority queue object with title, maximum number of priorities to use, and the capacity of the component queues. |
|
| Method Summary | |
|---|---|
boolean |
empty()
Returns a true if total queue is empty, otherwise, return false |
boolean |
full(int prio)
Returns true if queue is full of processes with priority prio, returns false otherwise |
void |
into(java.lang.Object ps)
Enqueue the specified object (process) into the priority queue |
int |
length()
Returns the total length of the priority queue |
java.lang.Object |
llast()
get last object enqueued to lowest priority queue |
int |
maxprio()
Return the maximum priority used |
java.lang.Object |
out()
Dequeue object (process) with the highest priority |
void |
pback(java.lang.Object ps)
Place the specified object (process) at the head of the queue |
java.lang.Object |
plast(int prio)
Get last object enqueued with the specified priority |
int |
plength(int prio)
Returns the length of a particular queue with given priority |
java.lang.Object |
pllast(int pr)
Get last object enqueued into lowest priority queue, down to the specified priority |
java.lang.Object |
pout(int prio)
Dequeues an object (process) with the specified priority |
void |
premov(java.lang.Object ps)
Remove the specified object (process) from the priority queue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Pqueue(java.lang.String a_name,
int max_prio)
public Pqueue(java.lang.String a_name,
int max_prio,
int maxsize)
s_name - title for the priority queuemax_prio - maximum priority to usemaxsize - capacity (maximum size) of the component queues| Method Detail |
|---|
public int length()
public boolean empty()
public int plength(int prio)
prio - priority of the queuepublic boolean full(int prio)
public int maxprio()
public void into(java.lang.Object ps)
ps - The object (process) to insert into the queuepublic void premov(java.lang.Object ps)
ps - The object (process) to remove from the queuepublic void pback(java.lang.Object ps)
ps - The object (process) to place into the queuepublic java.lang.Object out()
public java.lang.Object pout(int prio)
prio - Priority of the object to dequeuepublic java.lang.Object plast(int prio)
prio - Priority of the object to retrievepublic java.lang.Object llast()
public java.lang.Object pllast(int pr)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||