public class BusControlSystem
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BUS_CONTROL_SYSTEM_NR |
| Modifier and Type | Method and Description |
|---|---|
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
|
public static final java.lang.String BUS_CONTROL_SYSTEM_NR
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 systempublic 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 -