|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.onemind.commons.java.datastructure.CounterQueue
Represent a list of counters with a queue per counter objectYou can queue and dequeue to a counter identified by a counter object. NOTE: This class is not thread-safe
Constructor Summary | |
CounterQueue()
{@inheritDoc} |
Method Summary | |
boolean |
addToQueue(java.lang.Object o,
java.lang.Object queuer)
Add an queuer to the queue of the counter object. |
java.util.List |
clearQueue(java.lang.Object o)
Clear the queue of the counter object |
java.util.List |
getQueue(java.lang.Object o)
Get the (unmodifiable) queue of the counter object |
boolean |
removeFromQueue(java.lang.Object o,
java.lang.Object queuer)
Remove the queuer from the queue of the counter object. |
java.lang.Object |
removeNextFromQueue(java.lang.Object counter)
Remove the next queuer in the queue. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CounterQueue()
Method Detail |
public java.util.List getQueue(java.lang.Object o)
o
- the counter object
public java.util.List clearQueue(java.lang.Object o)
o
- the counter object
public boolean addToQueue(java.lang.Object o, java.lang.Object queuer)
o
- the counter objectqueuer
- the queue
public java.lang.Object removeNextFromQueue(java.lang.Object counter)
counter
- the counter
public boolean removeFromQueue(java.lang.Object o, java.lang.Object queuer)
o
- the counter objectqueuer
- the queuer
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |