|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmovement.BusControlSystem
public class BusControlSystem
This class controls busses and passengers that can use the bus. There can be many bus BusControlSystems, but a bus or passenger can only belong to one system.
Field Summary | |
---|---|
static java.lang.String |
BUS_CONTROL_SYSTEM_NR
|
Method Summary | |
---|---|
void |
busHasStopped(int busID,
Coord busStop,
Path nextPath)
Called by busses belonging to this system every time the bus has stopped. |
static BusControlSystem |
getBusControlSystem(int systemID)
Returns a reference to a BusControlSystem with ID provided as parameter. |
java.util.List<Coord> |
getBusStops()
|
SimMap |
getMap()
Get the underlying map of the system |
void |
registerBus(BusMovement bus)
Registers a bus to be part of a bus control system |
void |
registerTraveller(BusTravellerMovement traveller)
Registers a traveller/passenger to be part of a bus control system |
static void |
reset()
|
void |
setBusStops(java.util.List<Coord> busStops)
Set the bus stops that belong to this system |
void |
setMap(SimMap map)
Provide the system with the map |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String BUS_CONTROL_SYSTEM_NR
Method Detail |
---|
public static void reset()
public void busHasStopped(int busID, Coord busStop, Path nextPath)
busID
- Unique identifier of the busbusStop
- Coordinates of the bus stopnextPath
- The path to the next stoppublic static BusControlSystem getBusControlSystem(int systemID)
systemID
- unique ID of the system
public void registerBus(BusMovement bus)
bus
- The bus to registerpublic void registerTraveller(BusTravellerMovement traveller)
traveller
- The traveller to registerpublic void setMap(SimMap map)
map
- public SimMap getMap()
public java.util.List<Coord> getBusStops()
public void setBusStops(java.util.List<Coord> busStops)
busStops
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |