public abstract class Bus extends AbstractPersistable implements BusOrStop
Modifier and Type | Field and Description |
---|---|
protected int |
capacity |
protected RoadLocation |
departureLocation |
protected int |
mileageCost |
protected String |
name |
protected BusStop |
nextStop |
id
Constructor and Description |
---|
Bus() |
Modifier and Type | Method and Description |
---|---|
Bus |
getBus() |
int |
getCapacity() |
RoadLocation |
getDepartureLocation() |
abstract StopOrHub |
getDestination() |
abstract int |
getDistanceFromTo(RoadLocation sourceLocation,
RoadLocation targetLocation) |
abstract int |
getDurationFromTo(RoadLocation sourceLocation,
RoadLocation targetLocation) |
RoadLocation |
getLocation() |
int |
getMileageCost() |
String |
getName() |
BusStop |
getNextStop() |
abstract int |
getSetupCost() |
void |
setCapacity(int capacity) |
void |
setDepartureLocation(RoadLocation departureLocation) |
void |
setMileageCost(int mileageCost) |
void |
setName(String name) |
void |
setNextStop(BusStop nextStop) |
String |
toString() |
getId, setId
protected String name
protected RoadLocation departureLocation
protected int capacity
protected int mileageCost
protected BusStop nextStop
public String getName()
public void setName(String name)
public RoadLocation getDepartureLocation()
public void setDepartureLocation(RoadLocation departureLocation)
public int getCapacity()
public void setCapacity(int capacity)
public int getMileageCost()
public void setMileageCost(int mileageCost)
public BusStop getNextStop()
getNextStop
in interface BusOrStop
public void setNextStop(BusStop nextStop)
setNextStop
in interface BusOrStop
public abstract int getSetupCost()
public RoadLocation getLocation()
getLocation
in interface BusOrStop
public abstract int getDistanceFromTo(RoadLocation sourceLocation, RoadLocation targetLocation)
public abstract int getDurationFromTo(RoadLocation sourceLocation, RoadLocation targetLocation)
public abstract StopOrHub getDestination()
public String toString()
toString
in class AbstractPersistable
Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.