public class EventQueue
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.LinkedList<Event> |
queue
Backing storage for events.
|
Constructor and Description |
---|
EventQueue() |
Modifier and Type | Method and Description |
---|---|
Event |
get()
Retrieve event from the current active input queue.
|
void |
insert(EventQueue other)
Install new event queue.
|
boolean |
isEmpty()
Check if the event queue is empty.
|
void |
post(Event evt)
Post specified event into queue.
|
private java.util.LinkedList<Event> queue
public void post(Event evt)
evt
- Event to post.public Event get()
null
if no events are available.public boolean isEmpty()
true
if the event queue is empty or false
otherwise.public void insert(EventQueue other)
other
- New event queue to install.