|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.almendra.janet.cas.schedulers.CommandQueue
public class CommandQueue
Field Summary | |
---|---|
protected java.util.LinkedList |
commands
|
protected EDU.oswego.cs.dl.util.concurrent.ReentrantWriterPreferenceReadWriteLock |
lock
|
Constructor Summary | |
---|---|
CommandQueue()
|
Method Summary | |
---|---|
boolean |
add(java.lang.Object object)
Add an object to the queue. |
java.lang.Object |
getNext()
Remove the first object from the queue and return it. |
boolean |
hasNext()
Answer whether ther is at least another object in the queue. |
boolean |
isEmpty()
Answer true in case the queue is empty otherwise false. |
java.util.Iterator |
iterator()
Return an iterator with which to iterate over the queue objects. |
java.lang.Object |
remove(java.lang.Object object)
Remove an object from the queue. |
int |
size()
Answer the number of objects in the queue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.LinkedList commands
protected EDU.oswego.cs.dl.util.concurrent.ReentrantWriterPreferenceReadWriteLock lock
Constructor Detail |
---|
public CommandQueue()
Method Detail |
---|
public java.lang.Object getNext()
IQueue
getNext
in interface IQueue
public boolean add(java.lang.Object object)
IQueue
add
in interface IQueue
object
- the object to be added
public boolean isEmpty()
IQueue
isEmpty
in interface IQueue
public int size()
IQueue
size
in interface IQueue
public java.lang.Object remove(java.lang.Object object)
IQueue
remove
in interface IQueue
public boolean hasNext()
IQueue
hasNext
in interface IQueue
public java.util.Iterator iterator()
IQueue
iterator
in interface IQueue
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |