Class Domicile
- java.lang.Object
-
- org.optaplanner.examples.common.domain.AbstractPersistable
-
- org.optaplanner.examples.tsp.domain.Domicile
-
- All Implemented Interfaces:
Standstill
public class Domicile extends AbstractPersistable implements Standstill
-
-
Field Summary
-
Fields inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
id
-
-
Constructor Summary
Constructors Constructor Description Domicile()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getDistanceTo(Standstill standstill)
Location
getLocation()
void
setLocation(Location location)
String
toString()
-
Methods inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
getId, setId
-
-
-
-
Method Detail
-
getLocation
public Location getLocation()
- Specified by:
getLocation
in interfaceStandstill
- Returns:
- never null
-
setLocation
public void setLocation(Location location)
-
getDistanceTo
public long getDistanceTo(Standstill standstill)
- Specified by:
getDistanceTo
in interfaceStandstill
- 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:
toString
in classAbstractPersistable
-
-