Compares two external events by their time. @return -1, zero, 1 if this event happens before, at the same time, or after the other event @param other The other external event
(ExternalEvent other)
| 44 | * @param other The other external event |
| 45 | */ |
| 46 | public int compareTo(ExternalEvent other) { |
| 47 | if (this.time == other.time) { |
| 48 | return 0; |
| 49 | } |
| 50 | else if (this.time < other.time) { |
| 51 | return -1; |
| 52 | } |
| 53 | else { |
| 54 | return 1; |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * Returns a String representation of the event |