OptaPlanner distribution 6.2.1-SNAPSHOT

org.optaplanner.examples.tsp.domain
Class Visit

java.lang.Object
  extended by org.optaplanner.examples.common.domain.AbstractPersistable
      extended by org.optaplanner.examples.tsp.domain.Visit
All Implemented Interfaces:
Serializable, Comparable<AbstractPersistable>, Standstill

public class Visit
extends AbstractPersistable
implements Standstill

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
id
 
Constructor Summary
Visit()
           
 
Method Summary
 long getDistanceFromPreviousStandstill()
           
 long getDistanceTo(Standstill standstill)
           
 Location getLocation()
           
 Standstill getPreviousStandstill()
           
 void setLocation(Location location)
           
 void setPreviousStandstill(Standstill previousStandstill)
           
 String toString()
           
 
Methods inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
compareTo, getId, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Visit

public Visit()
Method Detail

getLocation

public Location getLocation()
Specified by:
getLocation in interface Standstill
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

getDistanceTo

public long getDistanceTo(Standstill standstill)
Specified by:
getDistanceTo in interface 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

OptaPlanner distribution 6.2.1-SNAPSHOT

Copyright © 2006-2015 JBoss by Red Hat. All Rights Reserved.