Interface Event

All Superinterfaces:
java.lang.Comparable<Event>
All Known Implementing Classes:
AbstractEvent, ArrivalEvent, DepartureEvent, SimulationEndEvent, SimulationReportEvent

public interface Event
extends java.lang.Comparable<Event>

Interface for simulation events.
COMP 2100
Project 3
October 2014


Field Summary
static int ARRIVAL_PRIORITY
          Priority level for arrivals is 0, the lowest priority.
static int DEPARTURE_PRIORITY
          Priority level for departures is 3, the highest priority.
static int SIMULATIONEND_PRIORITY
          Priority level for the simulation end event is 1, between report and arrival.
static int SIMULATIONREPORT_PRIORITY
          Priority level for the simulation report event is 2, between departure and end.
 
Method Summary
 int getPriority()
          Retrieves the event's priority.
 int getTime()
          Retrieves the event's scheduled time.
 void process()
          Process this event.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

ARRIVAL_PRIORITY

static final int ARRIVAL_PRIORITY
Priority level for arrivals is 0, the lowest priority.

See Also:
Constant Field Values

DEPARTURE_PRIORITY

static final int DEPARTURE_PRIORITY
Priority level for departures is 3, the highest priority.

See Also:
Constant Field Values

SIMULATIONREPORT_PRIORITY

static final int SIMULATIONREPORT_PRIORITY
Priority level for the simulation report event is 2, between departure and end.

See Also:
Constant Field Values

SIMULATIONEND_PRIORITY

static final int SIMULATIONEND_PRIORITY
Priority level for the simulation end event is 1, between report and arrival.

See Also:
Constant Field Values
Method Detail

getTime

int getTime()
Retrieves the event's scheduled time. This is required by the Event interface.

Returns:
The event's scheduled time.

getPriority

int getPriority()
Retrieves the event's priority. A larger value means higher priority. This is required by the Event interface.

Returns:
The event's priority.

process

void process()
Process this event.