public final class GeoLocation extends Object
限定符和类型 | 字段和说明 |
---|---|
double |
latitude
The latitude of this location in the range of [-90, 90]
|
double |
longitude
The longitude of this location in the range of [-180, 180]
|
构造器和说明 |
---|
GeoLocation(double latitude,
double longitude)
Creates a new GeoLocation with the given latitude and longitude.
|
限定符和类型 | 方法和说明 |
---|---|
static boolean |
coordinatesValid(double latitude,
double longitude)
Checks if these coordinates are valid geo coordinates.
|
boolean |
equals(Object o) |
int |
hashCode() |
String |
toString() |
public final double latitude
public final double longitude
public GeoLocation(double latitude, double longitude)
latitude
- The latitude in the range of [-90, 90]longitude
- The longitude in the range of [-180, 180]IllegalArgumentException
- If the coordinates are not valid geo coordinatespublic static boolean coordinatesValid(double latitude, double longitude)
latitude
- The latitude must be in the range [-90, 90]longitude
- The longitude must be in the range [-180, 180]Copyright © 2015 Wilddog. All rights reserved.