org.jvnet.lafwidget.utils
public class DeltaQueue extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DeltaQueue.Deltable
Base class for entries in a
DeltaQueue . |
static interface |
DeltaQueue.DeltaMatcher
Interface for comparing two delta instances.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<DeltaQueue.Deltable> |
queue
List of entries.
|
Constructor and Description |
---|
DeltaQueue()
Constructs a new empty non-blocking synchronized delta queue.
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected java.util.ArrayList<DeltaQueue.Deltable> queue
DeltaQueue.Deltable
s.public DeltaQueue()
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.