|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--location.Location
This represents a physical location (a longitude/latitude pair).
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 |
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)
equals
in class java.lang.Object
public Latitude getLatitude()
public Longitude getLongitude()
public double getX()
public double getY()
public java.lang.String toString()
toString
in class java.lang.Object
public double distance(Location l)
l
- the other locationpublic java.lang.Object clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |