|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.newisys.dv.Mailbox<T>
T - the type of object contained by this mailboxpublic final class Mailbox<T>
Implements an unlimited size, blocking FIFO using a SimulationManager.
| Constructor Summary | |
|---|---|
Mailbox(SimulationManager simManager)
Constructs a new mailbox with a generated name using the given simulation manager. |
|
Mailbox(SimulationManager simManager,
String name)
Constructs a new mailbox with the given name using the given simulation manager. |
|
| Method Summary | |
|---|---|
T |
getNoWait()
Returns the first item in the mailbox. |
T |
getWait()
Returns the first item in the mailbox. |
T |
peekNoWait()
Returns the first item in the mailbox. |
T |
peekWait()
Returns the first item in the mailbox. |
void |
put(T item)
Puts the item into the mailbox in the last position. |
int |
size()
Returns the number of items in the mailbox. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Mailbox(SimulationManager simManager,
String name)
simManager - the simulation manager coordinating this mailboxname - the name of this mailbox (for debugging purposes)public Mailbox(SimulationManager simManager)
simManager - the simulation manager coordinating this mailbox| Method Detail |
|---|
public void put(T item)
item - an item to put in the mailboxpublic T getWait()
public T getNoWait()
public T peekWait()
public T peekNoWait()
public int size()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||