OptaPlanner distribution 6.0.0-SNAPSHOT

org.optaplanner.examples.vehiclerouting.domain
Class Location

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

public class Location
extends AbstractPersistable

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
id
 
Constructor Summary
Location()
           
 
Method Summary
 double getLatitude()
           
 double getLongitude()
           
 int getMilliDistance(Location location)
          The distance is not in miles or km, but in the TSPLIB's unit of measurement.
 String getName()
           
 String getSafeName()
           
 void setLatitude(double latitude)
           
 void setLongitude(double longitude)
           
 void setName(String name)
           
 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

Location

public Location()
Method Detail

getName

public String getName()

setName

public void setName(String name)

getLatitude

public double getLatitude()

setLatitude

public void setLatitude(double latitude)

getLongitude

public double getLongitude()

setLongitude

public void setLongitude(double longitude)

getMilliDistance

public int getMilliDistance(Location location)
The distance is not in miles or km, but in the TSPLIB's unit of measurement.

Parameters:
location - 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

getSafeName

public String getSafeName()

OptaPlanner distribution 6.0.0-SNAPSHOT

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