Class BusStop
- java.lang.Object
-
- org.optaplanner.examples.common.domain.AbstractPersistable
-
- org.optaplanner.examples.coachshuttlegathering.domain.BusStop
-
public class BusStop extends AbstractPersistable implements BusOrStop, StopOrHub
-
-
Field Summary
Fields Modifier and Type Field Description protected Busbusprotected RoadLocationlocationprotected Stringnameprotected BusStopnextStopprotected intpassengerQuantityprotected BusOrStoppreviousBusOrStopprotected List<Shuttle>transferShuttleListprotected inttransportTimeLimitprotected IntegertransportTimeToHub-
Fields inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
id
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BusgetBus()intgetDistanceFrom(BusOrStop busOrStop)intgetDistanceFromPreviousCost()intgetDistanceToDestinationCost(StopOrHub destination)RoadLocationgetLocation()StringgetName()BusStopgetNextStop()intgetPassengerQuantity()BusOrStopgetPreviousBusOrStop()List<Shuttle>getTransferShuttleList()StringgetTransportLabel()intgetTransportTimeLimit()IntegergetTransportTimeRemainder()IntegergetTransportTimeToHub()booleanisVisitedByCoach()voidsetBus(Bus bus)voidsetLocation(RoadLocation location)voidsetName(String name)voidsetNextStop(BusStop nextStop)voidsetPassengerQuantity(int passengerQuantity)voidsetPreviousBusOrStop(BusOrStop previousBusOrStop)voidsetTransferShuttleList(List<Shuttle> transferShuttleList)voidsetTransportTimeLimit(int transportTimeLimit)voidsetTransportTimeToHub(Integer transportTimeToHub)StringtoString()-
Methods inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
getId, setId
-
-
-
-
Field Detail
-
name
protected String name
-
location
protected RoadLocation location
-
passengerQuantity
protected int passengerQuantity
-
transportTimeLimit
protected int transportTimeLimit
-
previousBusOrStop
protected BusOrStop previousBusOrStop
-
nextStop
protected BusStop nextStop
-
bus
protected Bus bus
-
transportTimeToHub
protected Integer transportTimeToHub
-
-
Method Detail
-
setName
public void setName(String name)
-
getLocation
public RoadLocation getLocation()
- Specified by:
getLocationin interfaceBusOrStop- Specified by:
getLocationin interfaceStopOrHub- Returns:
- never null
-
setLocation
public void setLocation(RoadLocation location)
-
getPassengerQuantity
public int getPassengerQuantity()
-
setPassengerQuantity
public void setPassengerQuantity(int passengerQuantity)
-
getTransportTimeLimit
public int getTransportTimeLimit()
-
setTransportTimeLimit
public void setTransportTimeLimit(int transportTimeLimit)
-
getPreviousBusOrStop
public BusOrStop getPreviousBusOrStop()
-
setPreviousBusOrStop
public void setPreviousBusOrStop(BusOrStop previousBusOrStop)
-
getNextStop
public BusStop getNextStop()
- Specified by:
getNextStopin interfaceBusOrStop- Returns:
- sometimes null
-
setNextStop
public void setNextStop(BusStop nextStop)
- Specified by:
setNextStopin interfaceBusOrStop
-
setBus
public void setBus(Bus bus)
-
getTransferShuttleList
public List<Shuttle> getTransferShuttleList()
- Specified by:
getTransferShuttleListin interfaceStopOrHub
-
setTransferShuttleList
public void setTransferShuttleList(List<Shuttle> transferShuttleList)
- Specified by:
setTransferShuttleListin interfaceStopOrHub
-
getTransportTimeToHub
public Integer getTransportTimeToHub()
- Specified by:
getTransportTimeToHubin interfaceStopOrHub
-
setTransportTimeToHub
public void setTransportTimeToHub(Integer transportTimeToHub)
-
getDistanceFromPreviousCost
public int getDistanceFromPreviousCost()
-
getDistanceFrom
public int getDistanceFrom(BusOrStop busOrStop)
-
getDistanceToDestinationCost
public int getDistanceToDestinationCost(StopOrHub destination)
-
isVisitedByCoach
public boolean isVisitedByCoach()
- Specified by:
isVisitedByCoachin interfaceStopOrHub
-
getTransportTimeRemainder
public Integer getTransportTimeRemainder()
-
getTransportLabel
public String getTransportLabel()
-
toString
public String toString()
- Overrides:
toStringin classAbstractPersistable
-
-