Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
A
C
D
E
G
I
N
O
R
S
T
U
X
Y
A
ACTIVE
- Static variable in class TSim.
SensorEvent
AddingArrayList
<
E
> - Class in
TSim
Maintains an ArrayList of elements of type E, with size increased as needed.
AddingArrayList()
- Constructor for class TSim.
AddingArrayList
Creates an ArrayList using default constructor.
C
CommandException
- Exception in
TSim
Thrown when a command to TSim fails.
CommandException(String)
- Constructor for exception TSim.
CommandException
Constructs an CommandException with the specified detailed error message.
CommandStatus
- Class in
TSim
CommandStatus represents the responses from TSim that does not carry information about sensors or trains but rather if the command issued succeeded or not.
CommandStatus(int)
- Constructor for class TSim.
CommandStatus
Creates a new CommandStatus message.
D
DERAILMENT
- Static variable in class TSim.
TrainErrorEvent
DERAILMENT
- Static variable in class TSim.
TrainEvent
E
event
- Variable in class TSim.
TrainErrorEvent
event
- Variable in class TSim.
TrainEvent
G
get(int)
- Method in class TSim.
AddingArrayList
Returns element at position index.
getEvent()
- Method in class TSim.
TrainErrorEvent
Returns the type of the event.
getEvent()
- Method in class TSim.
TrainEvent
Returns the type of the event.
getInstance()
- Static method in class TSim.
TSimInterface
Returns the single instance (singleton pattern).
getSensor(int)
- Method in class TSim.
TSimInterface
Blocks the calling thread until the specified train passes a sensor.
getStatus()
- Method in class TSim.
CommandStatus
Returns the status of the command.
getStatus()
- Method in class TSim.
SensorEvent
Returns the status of the sensor; either ACTIVE or INACTIVE.
getTrainId()
- Method in class TSim.
SensorEvent
Returns the id of the train affecting the sensor.
getTrainId()
- Method in class TSim.
TrainErrorEvent
Returns the id of the train affected byt the event.
getTrainId()
- Method in class TSim.
TrainEvent
Returns the id of the train affected byt the event.
getXpos()
- Method in class TSim.
SensorEvent
Returns the x coordinate of the affected sensor.
getYpos()
- Method in class TSim.
SensorEvent
Returns theyx coordinate of the affected sensor.
I
ILLEGAL_SPEED
- Static variable in class TSim.
CommandStatus
INACTIVE
- Static variable in class TSim.
SensorEvent
N
NO_SUCH_POS
- Static variable in class TSim.
CommandStatus
NO_SUCH_SWITCH
- Static variable in class TSim.
CommandStatus
NO_SUCH_TRAIN
- Static variable in class TSim.
CommandStatus
O
OK
- Static variable in class TSim.
CommandStatus
R
read()
- Method in class TSim.
TSimStream
Reads from the input stream and returns an object representing the message from TSim.
readInt(StreamTokenizer)
- Method in class TSim.
TSimStream
Help method that reads an integer from the tokenizer and returns it or throws an exception if the next token was not an integer.
readString(StreamTokenizer)
- Method in class TSim.
TSimStream
Help method that reads a string from the tokenizer and returns it or throws an exception if the next token was not a string.
S
SensorEvent
- Class in
TSim
SensorEvent represents the event of a train passing over a sensor.
SensorEvent(int, int, int, int)
- Constructor for class TSim.
SensorEvent
Creates a new SensorEvent for a specific train and sensor.
set(int, E)
- Method in class TSim.
AddingArrayList
Assigns elem at position index.
setDebug(boolean)
- Method in class TSim.
TSimInterface
Turns on and off printing of debug info to System.err.
setSpeed(int, int)
- Method in class TSim.
TSimInterface
Sets the speed of a train.
setSwitch(int, int, int)
- Method in class TSim.
TSimInterface
Sets the direction of the specified switch.
status
- Variable in class TSim.
CommandStatus
status
- Variable in class TSim.
SensorEvent
sTokenizer
- Variable in class TSim.
TSimStream
STOP_COLLISION
- Static variable in class TSim.
TrainErrorEvent
STOP_COLLISION
- Static variable in class TSim.
TrainEvent
SWITCH_LEFT
- Static variable in class TSim.
TSimInterface
SWITCH_RIGHT
- Static variable in class TSim.
TSimInterface
T
toString()
- Method in class TSim.
CommandStatus
Returns the string representation of the CommandStatus class.
toString()
- Method in class TSim.
SensorEvent
toString()
- Method in class TSim.
TrainErrorEvent
Returns a string representation of the event.
toString()
- Method in class TSim.
TrainEvent
Returns a string representation of the event.
TRAIN_COLLISION
- Static variable in class TSim.
TrainErrorEvent
TRAIN_COLLISION
- Static variable in class TSim.
TrainEvent
TRAIN_ON_SWITCH
- Static variable in class TSim.
CommandStatus
TrainErrorEvent
- Class in
TSim
Class representing an (erroneous) event for a train.
TrainErrorEvent(int, int)
- Constructor for class TSim.
TrainErrorEvent
Creates a new TrainErrorEvent for the specified train id and with the specified event type.
TrainEvent
- Class in
TSim
Class representing an (erroneous) event for a train.
TrainEvent(int, int)
- Constructor for class TSim.
TrainEvent
Creates a new TrainEvent for the specified train id and with the specified event type.
trainId
- Variable in class TSim.
SensorEvent
trainId
- Variable in class TSim.
TrainErrorEvent
trainId
- Variable in class TSim.
TrainEvent
TSim
- package TSim
TSimInformation
- Interface in
TSim
Umbrella type for messages from TSim.
TSimInterface
- Class in
TSim
The TSimInterface is the intended interface between TSim and the laboration.
TSimStream
- Class in
TSim
Reads text from the given input stream connected to TSim and returns a stream of TSimInformation.
TSimStream(InputStream)
- Constructor for class TSim.
TSimStream
Creates a new TSimStream that reads from the given InputStream.
U
UnparsableInputException
- Exception in
TSim
UnparsableInputException(String)
- Constructor for exception TSim.
UnparsableInputException
X
xPos
- Variable in class TSim.
SensorEvent
Y
yPos
- Variable in class TSim.
SensorEvent
A
C
D
E
G
I
N
O
R
S
T
U
X
Y
Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes