Drools Planner distribution 6.0.0.Alpha9

org.drools.planner.examples.tsp.domain
Class City

java.lang.Object
  extended by org.drools.planner.examples.common.domain.AbstractPersistable
      extended by org.drools.planner.examples.tsp.domain.City
All Implemented Interfaces:
Serializable, Comparable<AbstractPersistable>

public class City
extends AbstractPersistable

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.drools.planner.examples.common.domain.AbstractPersistable
id
 
Constructor Summary
City()
           
 
Method Summary
 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()
           
 
Methods inherited from class org.drools.planner.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

City

public City()
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)

getDistance

public int getDistance(City city)
The distance is not in miles or km, but in the TSPLIB's unit of measurement.

Parameters:
city - never null
Returns:
a positive number

toString

public String toString()
Overrides:
toString in class AbstractPersistable

getSafeName

public String getSafeName()

Drools Planner distribution 6.0.0.Alpha9

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