Class Visit
- java.lang.Object
-
- org.optaplanner.examples.common.domain.AbstractPersistable
-
- org.optaplanner.examples.tsp.domain.Visit
-
- All Implemented Interfaces:
Standstill
public class Visit extends AbstractPersistable implements Standstill
-
-
Field Summary
-
Fields inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
id
-
-
Constructor Summary
Constructors Constructor Description Visit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetDistanceFrom(Standstill standstill)longgetDistanceFromPreviousStandstill()longgetDistanceTo(Standstill standstill)LocationgetLocation()StandstillgetPreviousStandstill()voidsetLocation(Location location)voidsetPreviousStandstill(Standstill previousStandstill)StringtoString()-
Methods inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
getId, setId
-
-
-
-
Method Detail
-
getLocation
public Location getLocation()
- Specified by:
getLocationin interfaceStandstill- Returns:
- never null
-
setLocation
public void setLocation(Location location)
-
getPreviousStandstill
public Standstill getPreviousStandstill()
-
setPreviousStandstill
public void setPreviousStandstill(Standstill previousStandstill)
-
getDistanceFromPreviousStandstill
public long getDistanceFromPreviousStandstill()
- Returns:
- a positive number, the distance multiplied by 1000 to avoid floating point arithmetic rounding errors
-
getDistanceFrom
public long getDistanceFrom(Standstill standstill)
- Parameters:
standstill- never null- Returns:
- a positive number, the distance multiplied by 1000 to avoid floating point arithmetic rounding errors
-
getDistanceTo
public long getDistanceTo(Standstill standstill)
- Specified by:
getDistanceToin 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:
toStringin classAbstractPersistable
-
-