Class Bus
- java.lang.Object
-
- org.optaplanner.examples.common.domain.AbstractPersistable
-
- org.optaplanner.examples.coachshuttlegathering.domain.Bus
-
- All Implemented Interfaces:
BusOrStop
public abstract class Bus extends AbstractPersistable implements BusOrStop
-
-
Field Summary
Fields Modifier and Type Field Description protected intcapacityprotected RoadLocationdepartureLocationprotected intmileageCostprotected Stringnameprotected BusStopnextStop-
Fields inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
id
-
-
Constructor Summary
Constructors Constructor Description Bus()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BusgetBus()intgetCapacity()RoadLocationgetDepartureLocation()abstract StopOrHubgetDestination()abstract intgetDistanceFromTo(RoadLocation sourceLocation, RoadLocation targetLocation)abstract intgetDurationFromTo(RoadLocation sourceLocation, RoadLocation targetLocation)RoadLocationgetLocation()intgetMileageCost()StringgetName()BusStopgetNextStop()IntegergetPassengerQuantityTotal()abstract intgetSetupCost()voidsetCapacity(int capacity)voidsetDepartureLocation(RoadLocation departureLocation)voidsetMileageCost(int mileageCost)voidsetName(String name)voidsetNextStop(BusStop nextStop)voidsetPassengerQuantityTotal(Integer passengerQuantityTotal)StringtoString()-
Methods inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
getId, setId
-
-
-
-
Field Detail
-
name
protected String name
-
departureLocation
protected RoadLocation departureLocation
-
capacity
protected int capacity
-
mileageCost
protected int mileageCost
-
nextStop
protected BusStop nextStop
-
-
Method Detail
-
getName
public String getName()
-
setName
public void setName(String name)
-
getDepartureLocation
public RoadLocation getDepartureLocation()
-
setDepartureLocation
public void setDepartureLocation(RoadLocation departureLocation)
-
getCapacity
public int getCapacity()
-
setCapacity
public void setCapacity(int capacity)
-
getMileageCost
public int getMileageCost()
-
setMileageCost
public void setMileageCost(int mileageCost)
-
getNextStop
public BusStop getNextStop()
- Specified by:
getNextStopin interfaceBusOrStop- Returns:
- sometimes null
-
setNextStop
public void setNextStop(BusStop nextStop)
- Specified by:
setNextStopin interfaceBusOrStop
-
getPassengerQuantityTotal
public Integer getPassengerQuantityTotal()
-
setPassengerQuantityTotal
public void setPassengerQuantityTotal(Integer passengerQuantityTotal)
-
getSetupCost
public abstract int getSetupCost()
-
getLocation
public RoadLocation getLocation()
- Specified by:
getLocationin interfaceBusOrStop- Returns:
- never null
-
getDistanceFromTo
public abstract int getDistanceFromTo(RoadLocation sourceLocation, RoadLocation targetLocation)
-
getDurationFromTo
public abstract int getDurationFromTo(RoadLocation sourceLocation, RoadLocation targetLocation)
-
getDestination
public abstract StopOrHub getDestination()
-
toString
public String toString()
- Overrides:
toStringin classAbstractPersistable
-
-