25package umontreal.ssj.simevents.eventlist;
27import java.util.ListIterator;
28import umontreal.ssj.simevents.Event;
This abstract class provides event scheduling tools.
An interface for implementations of event lists.
Event getFirst()
Returns the first event in the event list.
ListIterator< Event > listIterator()
Returns a list iterator over the elements of the class Event in this list.
Event removeFirst()
Removes the first event from the event list (to cancel or execute this event).
void addBefore(Event ev, Event other)
Same as add, but adds the new event ev immediately before the event other in the list.
Event getFirstOfClass(String cl)
Returns the first event of the class cl (a subclass of Event) in the event list.
void addAfter(Event ev, Event other)
Same as add, but adds the new event ev immediately after the event other in the list.
boolean isEmpty()
Returns true if and only if the event list is empty (no event is scheduled).
void add(Event ev)
Adds a new event in the event list, according to the time of ev.
public< E extends Event > E getFirstOfClass(Class< E > cl)
Returns the first event of the class E (a subclass of Event) in the event list.
void clear()
Empties the event list, i.e., cancels all events.
void addFirst(Event ev)
Adds a new event at the beginning of the event list.