public class Location
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Represents a latitude and longitude pair, expressed in geographic coordinate system degrees (for example 47.6204, -122.3491).
Elevation is currently not supported.
Modifier and Type | Field and Description |
---|---|
private java.lang.Double |
latitude
The latitude.
|
private java.lang.Double |
longitude
The longitude.
|
Constructor and Description |
---|
Location() |
Modifier and Type | Method and Description |
---|---|
Location |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.Double |
getLatitude()
The latitude.
|
java.lang.Double |
getLongitude()
The longitude.
|
int |
hashCode() |
void |
setLatitude(java.lang.Double latitude)
The latitude.
|
void |
setLongitude(java.lang.Double longitude)
The longitude.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Location |
withLatitude(java.lang.Double latitude)
The latitude.
|
Location |
withLongitude(java.lang.Double longitude)
The longitude.
|
private java.lang.Double latitude
The latitude.
private java.lang.Double longitude
The longitude.
public void setLatitude(java.lang.Double latitude)
The latitude.
latitude
- The latitude.public java.lang.Double getLatitude()
The latitude.
public Location withLatitude(java.lang.Double latitude)
The latitude.
latitude
- The latitude.public void setLongitude(java.lang.Double longitude)
The longitude.
longitude
- The longitude.public java.lang.Double getLongitude()
The longitude.
public Location withLongitude(java.lang.Double longitude)
The longitude.
longitude
- The longitude.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Location clone()
clone
in class java.lang.Object