|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object location.Location
This represents a physical location (a longitude/latitude pair).
Field Summary | |
private Latitude |
latitude
The latitude. |
private Longitude |
longitude
The longitude. |
Constructor Summary | |
Location(Latitude lat,
Longitude lon)
Constructor. |
|
Location(Location loc)
The copy constructor. |
Method Summary | |
java.lang.Object |
clone()
This method returns a deep copy of this object. |
double |
distance(Location l)
Get the distance in meters from this location to another location. |
boolean |
equals(java.lang.Object o)
Determines if another object is equal to this location. |
Latitude |
getLatitude()
Accessor method to the latitude. |
Longitude |
getLongitude()
Accessor method to the longitude. |
double |
getX()
Returns the sexagesimal notation of the longitude of this GPS Location |
double |
getY()
Returns the sexagesimal notation of the latitude of this GPS Location |
java.lang.String |
toString()
Get a string representation of the location. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private Latitude latitude
private Longitude longitude
Constructor Detail |
public Location(Latitude lat, Longitude lon)
lat
- the host's initial latitudelon
- the host's initial longitudepublic Location(Location loc)
Method Detail |
public boolean equals(java.lang.Object o)
public Latitude getLatitude()
public Longitude getLongitude()
public double getX()
public double getY()
public java.lang.String toString()
public double distance(Location l)
l
- the other location
public java.lang.Object clone()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |