public class Coord extends Object
Constructor and Description |
---|
Coord(Coord toClone)
Copy Constructor
|
Coord(double latitude,
double longitude)
Creates a isProjected Coord
|
Coord(double latitude,
double longitude,
boolean projected)
a Constructor with getLatitude, getLongitude
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
Indicates whether some other object is "equal to" this one.
|
double |
getLatitude()
Gets the Coord Latitude
|
double |
getLongitude()
Gets the Coord Longitude.
|
int |
hashCode()
Returns a hash code value for the object.
|
boolean |
isProjected()
Returns true if this is a projected Coordinate
|
void |
setLatitude(double latitude)
Sets the Coord Latitude.
|
void |
setLongitude(double longitude)
Sets the Coord Longitude.
|
void |
setProjected(boolean projected)
Sets Coord projected
|
String |
toString()
Returns a string representation of the object.
|
Coord |
translate(Coord coordinates)
Create a new Coord object which is translated with the given coordinates
|
Coord |
translate(double latitude,
double longitude)
Create a new Coord object which is translated with the given coordinates
|
public Coord(double latitude, double longitude)
latitude
- the getLatitude of this Coordinatelongitude
- the getLongitude of this Coordinatepublic Coord(double latitude, double longitude, boolean projected)
latitude
- the Coordinate getLatitudelongitude
- the Coordinate getLongitudeprojected
- declares if this is a isProjected Coordinatepublic Coord(Coord toClone)
toClone
- to copypublic double getLongitude()
public double getLatitude()
public void setLongitude(double longitude)
public void setLatitude(double latitude)
public String toString()
public Coord translate(double latitude, double longitude)
latitude
- translate current latitude with this latitudelongitude
- translate current longitude with this longitudepublic Coord translate(Coord coordinates)
coordinates
- translate current Coord with the given coordinatespublic boolean equals(Object other)
public int hashCode()
public final boolean isProjected()
public void setProjected(boolean projected)
projected
- flag