|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jvnet.lafwidget.utils.DeltaQueue
public class DeltaQueue
Delta queue. Follows a standard approach from OS world for effeciently keeping tracks of scheduled events.
Nested Class Summary | |
---|---|
static class |
DeltaQueue.Deltable
Base class for entries in a DeltaQueue . |
static interface |
DeltaQueue.DeltaMatcher
Interface for comparing two delta instances. |
Field Summary | |
---|---|
protected java.util.ArrayList<DeltaQueue.Deltable> |
queue
List of entries. |
Constructor Summary | |
---|---|
DeltaQueue()
Constructs a new empty non-blocking synchronized delta queue. |
Method Summary | |
---|---|
java.util.List<DeltaQueue.Deltable> |
dequeue(int delay)
Returns all deltables that have at most specified delay left. |
void |
dump()
Dumps the contents of the delta queue. |
static void |
main(java.lang.String[] args)
For testing. |
void |
queue(DeltaQueue.Deltable deltable)
Queues the specified deltable. |
void |
removeMatching(DeltaQueue.DeltaMatcher matcher)
Removes all deltas matching the specified matcher. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.ArrayList<DeltaQueue.Deltable> queue
DeltaQueue.Deltable
s.
Constructor Detail |
---|
public DeltaQueue()
Method Detail |
---|
public void queue(DeltaQueue.Deltable deltable)
DeltaQueue.Deltable.getDelta()
may have
changed. Do not reuse or change the passed deltable after this method
returns.
deltable
- Deltable.public java.util.List<DeltaQueue.Deltable> dequeue(int delay)
delay
- Delay.
public void removeMatching(DeltaQueue.DeltaMatcher matcher)
matcher
- Delta matcher.public void dump()
public static void main(java.lang.String[] args)
args
- Ignored.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |