|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--EventQueue
A simple heap to represent the event queue
Event
Constructor Summary | |
EventQueue()
Construct a new queue |
Method Summary | |
boolean |
empty()
Returns true if the queue is empty (there are no pending events). |
Event |
getNext()
Returns the next event (the one with the earliest time) and removes it from the queue. |
void |
insert(Event e)
Inserts an event into the queue. |
Event |
peekNext()
Returns the next event (the one with the earliest time) without removing it from the queue. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public EventQueue()
Method Detail |
public boolean empty()
public void insert(Event e) throws TimeInconsistencyException
e
- The event to insertpublic Event peekNext()
public Event getNext()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |