public abstract class AbstrThreadVehicle extends java.lang.Thread implements IThreadVehicle
Constructor and Description |
---|
AbstrThreadVehicle(IModelVehicle myVehicle)
Base constructor.
|
Modifier and Type | Method and Description |
---|---|
static Coordinates |
getCenterPoint(ITile startTile,
Direction startDir,
Direction endDir)
Function to get center point of a curve.
|
IModelVehicle |
getModelVehicle()
Return model vehicle's object related to this thread.
|
void |
start()
This is an extends-thread class, so this is needed to start the thread.
|
abstract void |
terminate()
This method must be used to start the thread.
|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
join, run
public AbstrThreadVehicle(IModelVehicle myVehicle)
myVehicle
- vehicle to be updated from this threadpublic abstract void terminate()
terminate
in interface IThreadVehicle
public void start()
start
in interface IThreadVehicle
start
in class java.lang.Thread
public IModelVehicle getModelVehicle()
public static Coordinates getCenterPoint(ITile startTile, Direction startDir, Direction endDir)
startTile
- Tile from which the vehicle will curvestartDir
- Original direction of the vehicleendDir
- Final direction of the vehicle