1 public class Event implements Comparable<Event>
2 {
3 private double time;
4
5 public Event(double eventTime)
6 {
7 time = eventTime;
8 }
9
10 public void process(Simulation sim) {}
11 public double getTime() { return time; }
12
13 public int compareTo(Event other)
14 {
15 if (time < other.time) { return -1; }
16 else if (time > other.time) { return 1; }
17 else { return 0; }
18 }
19 }