|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdevutil.QueueMux
Field Summary | |
private int |
current
|
private Queue[] |
queues
|
Constructor Summary | |
QueueMux(Queue[] queues)
Creates the array of queues managed by this class. |
Method Summary | |
void |
add(java.lang.Object item)
|
java.util.Enumeration |
elements()
|
int |
getCurrentActiveQueue()
Returns the index of the queue currently active. |
Queue[] |
getQueues()
Gets back the array of queues. |
boolean |
isEmpty()
|
java.lang.Object |
remove()
Blocks if the queue is empty. |
void |
setActiveQueue(int index)
Sets the queue on which the operations are performed. |
int |
size()
|
void |
waitUntilEmpty()
It blocks until the queue is empty. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Queue[] queues
private int current
Constructor Detail |
public QueueMux(Queue[] queues)
Method Detail |
public Queue[] getQueues()
public void setActiveQueue(int index)
0
, i.e., the first one in the array.
public java.lang.Object remove()
public void add(java.lang.Object item)
public void waitUntilEmpty()
public java.util.Enumeration elements()
public boolean isEmpty()
public int size()
public int getCurrentActiveQueue()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |