tasks
Class City

java.lang.Object
  extended by tasks.City
All Implemented Interfaces:
java.io.Serializable

public class City
extends java.lang.Object
implements java.io.Serializable

City class for TSP task

Author:
Diana Abbas, Ryan Neal
See Also:
Serialized Form

Field Summary
 double[] city
          X and Y coordinates of city
 
Method Summary
 boolean compare(City c)
          Determines if two cities point to the same location
 double getX()
          Returns the X component of the City
 double getY()
          returns the Y component of the City
 java.lang.String toString()
          (non-Javadoc)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

city

public double[] city
X and Y coordinates of city

Method Detail

getX

public double getX()
Returns the X component of the City

Returns:
double the X coordinate of the city

getY

public double getY()
returns the Y component of the City

Returns:
double the Y coordinate of the city

compare

public boolean compare(City c)
Determines if two cities point to the same location

Parameters:
City - the city to compare against
Returns:
Boolean True if they are the same, False otherwise

toString

public java.lang.String toString()
(non-Javadoc)

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()