Interface EventQueue
- All Known Implementing Classes:
CircularEventQueue, HybridEventQueue, ListEventQueue, TimingEventQueue
Name: EventQueue
Description: Event Queue specifies a queue of SimEvent objects sorted by time and insertion order. This class holds all simulation events, thus its performances impact dramatically the simulation.
Date: 12/mag/2009 Time: 08:02:18
- Version:
- 1.0
- Author:
- Bertoli Marco
-
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds an event to the queuevoidclear()Clears this queue, removing all pointersiterator()Returns an iterator that iterates over this queue elements in no special order.peek()Method peek.pop()Method pop.booleanRemoves given eventintsize()Method size.Methods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
size
int size()Method size.- Returns:
- the number of events in this queue
-
add
Adds an event to the queue- Parameters:
event- the event to add- Returns:
- true if element was added, false otherwise.
-
pop
-
peek
-
remove
Removes given event- Parameters:
ev- the event to remove- Returns:
- true if event was found, false otherwise
-
clear
void clear()Clears this queue, removing all pointers -
iterator
-