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() |
compareTo, getId, setIdprotected 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 BusOrStoppublic void setNextStop(BusStop nextStop)
setNextStop in interface BusOrStoppublic abstract int getSetupCost()
public RoadLocation getLocation()
getLocation in interface BusOrStoppublic 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 AbstractPersistableCopyright © 2006–2016 JBoss by Red Hat. All rights reserved.