|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectpsimjava.Squeue
public class Squeue
PsimJ Java package for Object Oriented simulation
Object-oriented simulation package, process interaction approach.
(C) J. M. Garrido. June 2000, 2003, 2004, 2007 Simple queue (FIFO) class for PsimJ.
Objects of this class are simple (FIFO) queues.
| Constructor Summary | |
|---|---|
Squeue(java.lang.String a_name)
Constructor for simple queue for initialicing queues with specified name. |
|
Squeue(java.lang.String a_name,
int max_objects)
Constructor for initialicing objects of simple queues with a specified name and capacity (number of objects). |
|
| Method Summary | |
|---|---|
void |
back(java.lang.Object p)
Insert the specified object to the head of the queue. |
boolean |
empty()
Check if queue is empty. |
boolean |
full()
Check if the queue is full. |
java.lang.String |
get_name()
|
void |
into(java.lang.Object p)
Insert specified object to the tail of the queue. |
java.lang.Object |
last()
Remove the last object enqueued (the one at the tail of queue). |
int |
length()
Get current number of objects in queue (queue size) |
java.lang.Object |
out()
Dequeue an object or process from the head of queue. |
void |
remov(java.lang.Object pr)
Find and remove specified object or process from queue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Squeue(java.lang.String a_name,
int max_objects)
a_name - Title for the simple queue.max_objects - Maximum number of objects (capacity of the queue).public Squeue(java.lang.String a_name)
a_name - Title for the simple queue.| Method Detail |
|---|
public java.lang.String get_name()
public int length()
public boolean full()
public boolean empty()
public void into(java.lang.Object p)
p - Object (or process) to enqueue.public void back(java.lang.Object p)
p - Object (or process) to insert into the queue.public java.lang.Object out()
public java.lang.Object last()
public void remov(java.lang.Object pr)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||