public final class GeoPt extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<GeoPt>
Modifier and Type | Field and Description |
---|---|
static long
|
serialVersionUID
|
Constructor and Description |
---|
GeoPt
(float latitude,
float longitude)
Constructs a
GeoPt
.
|
Modifier and Type | Method and Description |
---|---|
int
|
compareTo
(
GeoPt
o)
Sort first by latitude, then by longitude
|
boolean
|
equals
(java.lang.Object o)
|
float
|
getLatitude
()
|
float
|
getLongitude
()
|
int
|
hashCode
()
|
java.lang.String
|
toString
()
|
public static final long serialVersionUID
public GeoPt(float latitude, float longitude)
GeoPt
.
latitude
- The latitude. Must be between -90 and 90 (inclusive).
longitude
- The longitude. Must be between -180 and 180 (inclusive).
java.lang.IllegalArgumentException
- If
latitude
or
longitude
is outside the legal range.
public float getLatitude()
public float getLongitude()
public int compareTo(GeoPt o)
compareTo
in interface
java.lang.Comparable<
GeoPt
>
public boolean equals(java.lang.Object o)
equals
in class
java.lang.Object
public int hashCode()
hashCode
in class
java.lang.Object
public java.lang.String toString()
toString
in class
java.lang.Object