Class Depot
- java.lang.Object
-
- org.optaplanner.examples.common.domain.AbstractPersistable
-
- org.optaplanner.examples.vehiclerouting.domain.Depot
-
- Direct Known Subclasses:
TimeWindowedDepot
public class Depot extends AbstractPersistable
-
-
Field Summary
Fields Modifier and Type Field Description protected Locationlocation-
Fields inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
id
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetDistanceTo(Standstill standstill)LocationgetLocation()voidsetLocation(Location location)StringtoString()-
Methods inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
getId, setId
-
-
-
-
Field Detail
-
location
protected Location location
-
-
Constructor Detail
-
Depot
public Depot()
-
Depot
public Depot(long id, Location location)
-
-
Method Detail
-
getLocation
public Location getLocation()
-
setLocation
public void setLocation(Location location)
-
getDistanceTo
public long getDistanceTo(Standstill standstill)
- Parameters:
standstill- never null- Returns:
- a positive number, the distance multiplied by 1000 to avoid floating point arithmetic rounding errors
-
toString
public String toString()
- Overrides:
toStringin classAbstractPersistable
-
-