|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTSim.TrainEvent
public class TrainEvent
An (erroneous) event for a train.
Field Summary | |
---|---|
static int |
DERAILMENT
Event type: Train has run off the rails. |
static int |
STOP_COLLISION
Event type: Train has collided with a stop at the end of the track. |
static int |
TRAIN_COLLISION
Event type: Train has collided with another train. |
Constructor Summary | |
---|---|
TrainEvent(int event)
Create a new TrainEvent for the specified train id and with the specified event type. |
Method Summary | |
---|---|
int |
getEvent()
Returns the type of the 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 |
---|
public static final int TRAIN_COLLISION
public static final int STOP_COLLISION
public static final int DERAILMENT
Constructor Detail |
---|
public TrainEvent(int event)
event
- the type of the event.Method Detail |
---|
public int getEvent()
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 |