Package jasima.core.simulation
Interface EventQueue
-
- All Known Implementing Classes:
EventHeap
public interface EventQueuePublic interface of event queue implementations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<SimEvent>allEvents()Returns all events as an ordered list.SimEventextract()Extract the (chronologically) next event from the queue.voidinsert(SimEvent e)Insert an event in the queue.booleanremove(SimEvent element)Removes the given element from the queue.intsize()Returns the number of events currently contained in the event queue.
-
-
-
Method Detail
-
insert
void insert(SimEvent e)
Insert an event in the queue.
-
extract
SimEvent extract()
Extract the (chronologically) next event from the queue.
-
remove
boolean remove(SimEvent element)
Removes the given element from the queue.- Parameters:
element- the element to remove (mustn't be null)- Returns:
trueif the element was contained in the heap and successfully removed,falseotherwise
-
size
int size()
Returns the number of events currently contained in the event queue.
-
-