|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTSim.TrainErrorEvent
public class TrainErrorEvent
Class representing an (erroneous) event for a train.
Field Summary | |
---|---|
static int |
DERAILMENT
|
protected int |
event
|
static int |
STOP_COLLISION
|
static int |
TRAIN_COLLISION
|
protected int |
trainId
|
Constructor Summary | |
---|---|
TrainErrorEvent(int trainId,
int event)
Creates a new TrainErrorEvent for the specified train id and with the specified event type. |
Method Summary | |
---|---|
int |
getEvent()
Returns the type of the event. |
int |
getTrainId()
Returns the id of the train affected byt 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
protected int event
protected int trainId
Constructor Detail |
---|
public TrainErrorEvent(int trainId, int event)
trainId
- the id of the train affected by the event.event
- the type of the event.Method Detail |
---|
public int getEvent()
public int getTrainId()
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 |