org.optaplanner.examples.tsp.domain
public class City extends AbstractPersistable
id
Constructor and Description |
---|
City() |
Modifier and Type | Method and Description |
---|---|
int |
getDistance(City city)
The distance is not in miles or km, but in the TSPLIB's unit of measurement.
|
double |
getLatitude() |
double |
getLongitude() |
String |
getName() |
String |
getSafeName() |
void |
setLatitude(double latitude) |
void |
setLongitude(double longitude) |
void |
setName(String name) |
String |
toString() |
compareTo, getId, setId
public String getName()
public void setName(String name)
public double getLatitude()
public void setLatitude(double latitude)
public double getLongitude()
public void setLongitude(double longitude)
public int getDistance(City city)
city
- never nullpublic String toString()
toString
in class AbstractPersistable
public String getSafeName()
Copyright © 2006-2013 JBoss by Red Hat. All Rights Reserved.