|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinput.ExternalEvent
public class ExternalEvent
Super class for all external events. All new classes of external events must extend this class. This can also be used as a dummy event if only an update request (and no further actions) to all hosts is needed.
Field Summary | |
---|---|
protected double |
time
Time of the event (simulated seconds) |
Constructor Summary | |
---|---|
ExternalEvent(double time)
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected double time
Constructor Detail |
---|
public ExternalEvent(double time)
Method Detail |
---|
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 event
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |