public class GeoLocation extends Object
| Modifier and Type | Field and Description | 
|---|---|
static double | 
EARTH_RADIUS_KM  | 
| Constructor and Description | 
|---|
GeoLocation(double latitude,
           double longitude)
Creates a new location using the specified coordinates. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
double | 
kilometersTo(GeoLocation other)
Returns the distance in kilometers, between this location and another. 
 | 
double | 
latitude()
Returns the latitude of this location. 
 | 
double | 
longitude()
Returns the longitude of this location. 
 | 
String | 
toString()  | 
public static final double EARTH_RADIUS_KM
public GeoLocation(double latitude,
                   double longitude)
latitude - latitude linelongitude - longitude linepublic double latitude()
public double longitude()
public double kilometersTo(GeoLocation other)
other - other geo location