public class ExternalEvent extends java.lang.Object implements java.lang.Comparable<ExternalEvent>, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected double |
time
Time of the event (simulated seconds)
|
| Constructor and Description |
|---|
ExternalEvent(double time) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ExternalEvent other)
Compares two external events by their time.
|
double |
getTime()
Returns the time when this event should happen.
|
void |
processEvent(World world)
Processes the external event.
|
java.lang.String |
toString()
Returns a String representation of the event
|
public void processEvent(World world)
world - World where the actors of the event arepublic double getTime()
public int compareTo(ExternalEvent other)
compareTo in interface java.lang.Comparable<ExternalEvent>other - The other external eventpublic java.lang.String toString()
toString in class java.lang.Object