This abstract class provides event scheduling tools. Each type of event should be defined as a subclass of the class
Event, and should provide an implementation of the method {@link #actions actions} which is executed when an event of this type occurs.The instances of these subclasses are the actual events.
Each event is linked to a simulator represented by an instance of {@link Simulator} before it can be scheduled and processed.A default simulator, given by Simulator.getDefaultSimulator, is used if no simulator is linked explicitly with an event. When an event is constructed, it is not scheduled. It must be scheduled separately by calling one of the scheduling methods {@link #schedule schedule}, {@link #scheduleNext scheduleNext}, {@link #scheduleBefore scheduleBefore}, etc. An event can also be cancelled before it occurs.
A scheduled event has an associated time at which it will happen and a priority, which can be queried using the methods {@link #time time} and {@link #priority priority}, respectively. By default, events occur in ascending order of time, and have priority 1. Events with the same time occur in ascending order of priority. For example, if events e1 and e2 occur at the same time with priority 2 and 1 respectively, then e2 will occur before e1. Events with the same time and priority occur in the order they were scheduled.