|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectus.zuercher.gpx2map.coord.LatLon
public final class LatLon
LatLon represents a location as decimal degrees of latitude and longitude.
| Field Summary | |
|---|---|
private double |
latitude
Degrees latitude. |
private double |
longitude
Degrees longitude. |
| Constructor Summary | |
|---|---|
LatLon(double latitude,
double longitude)
Construct a new LatLon. |
|
| Method Summary | |
|---|---|
boolean |
eastOf(LatLon other)
Test whether this LatLon represents a location east of
another LatLon. |
boolean |
equals(LatLon other)
Test whether this coordinate is equal to another. |
boolean |
equals(Object other)
Test whether this coordinate is equal to another. |
double |
getLatitude()
Retrieve the degrees of latitude for this coordinate. |
double |
getLongitude()
Retrieve the degrees of longitude for this coordinate. |
int |
hashCode()
Compute a reasonable hash code for this coordinate. |
boolean |
northOf(LatLon other)
Test whether this LatLon represents a location north of
another LatLon. |
String |
toString()
Generate a string describing this coordinate. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final double latitude
private final double longitude
| Constructor Detail |
|---|
public LatLon(double latitude,
double longitude)
latitude - degrees latitudelongitude - degrees longitude| Method Detail |
|---|
public double getLatitude()
public double getLongitude()
public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(LatLon other)
other - coordinate to compare to
public boolean equals(Object other)
equals in class Objectother - coordinate to compare to
ClassCastException - if other is not a
LatLonpublic boolean northOf(LatLon other)
LatLon represents a location north of
another LatLon.
other - coordinate to compare to
this is north of otherpublic boolean eastOf(LatLon other)
LatLon represents a location east of
another LatLon.
other - coordinate to compare to
this is east of other
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||