// CS 1538 Fall 2009 // This class sets up the structure and functionality of events. // By using inheritance here, we enable the different types // of events to be compatible but still distinguishable in an // object-oriented way. Note that I am using the parameterized // Comparable interface of JDK 1.5. public abstract class SimEvent implements Comparable { protected int e_time; public int get_e_time() { return e_time; } public int compareTo(SimEvent rhs) { if (e_time < rhs.e_time) return -1; else if (e_time == rhs.e_time) return 0; else return 1; } }