org.optaplanner.examples.tsp.domain
Class Visit
java.lang.Object
org.optaplanner.examples.common.domain.AbstractPersistable
org.optaplanner.examples.tsp.domain.Visit
- All Implemented Interfaces:
- Serializable, Comparable<AbstractPersistable>, Standstill
public class Visit
- extends AbstractPersistable
- implements Standstill
- See Also:
- Serialized Form
Constructor Summary |
Visit()
|
Visit
public Visit()
getCity
public City getCity()
- Specified by:
getCity
in interface Standstill
- Returns:
- never null
setCity
public void setCity(City city)
getPreviousStandstill
public Standstill getPreviousStandstill()
setPreviousStandstill
public void setPreviousStandstill(Standstill previousStandstill)
getDistanceToPreviousStandstill
public long getDistanceToPreviousStandstill()
- Returns:
- a positive number, the distance multiplied by 1000 to avoid floating point arithmetic rounding errors
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:
toString
in class AbstractPersistable
Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.