Package collection.City
Class Coordinates
java.lang.Object
collection.City.Coordinates
Class representing coordinates
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Coordinates
public Coordinates(int x, double y) Constructor for creating Coordinates object- Parameters:
x
- - coordinate x valuey
- - coordinate y value
-
Coordinates
public Coordinates()
-
-
Method Details
-
getX
public int getX() -
setX
public void setX(int x) -
getY
public double getY() -
setY
public void setY(double y) -
compareTo
Compares two Coordinates objects by their x and y values- Parameters:
o
- - Coordinates object to compare- Returns:
- - negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object
-
hashCode
public int hashCode() -
toString
-