|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simoes.lpd.util.Queue
Queue is just a queue
Field Summary | |
protected static long |
counter
|
static long |
INVALID_ID
|
protected java.lang.String |
name
|
protected java.util.List |
queue
|
Constructor Summary | |
Queue(java.lang.String name)
constructor. |
Method Summary | |
long |
add(java.lang.Object object)
add method. |
java.lang.String |
getName()
getName. |
QueuedObject |
getNext()
Gets the last Object in the Queue without removing it. |
java.util.List |
list()
list of the items in the queue (a copy of each one). |
static void |
main(java.lang.String[] args)
|
java.lang.Object |
remove(long id)
remove by unique identifier. |
int |
size()
size of the queue. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final long INVALID_ID
protected static long counter
protected java.lang.String name
protected java.util.List queue
Constructor Detail |
public Queue(java.lang.String name)
name
- - name of the print queue.Method Detail |
public java.lang.String getName()
public long add(java.lang.Object object)
object
- - object to add to the queue.
public java.lang.Object remove(long id) throws ObjectNotFoundException
id
- - unique identifier of the queued object.
ObjectNotFoundException
- if the object is not found in the queuepublic int size()
public java.util.List list()
public QueuedObject getNext() throws ObjectNotFoundException
ObjectNotFoundException
public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |