Class GeoPointChecker
- java.lang.Object
-
- com.google.appengine.api.search.checkers.GeoPointChecker
-
-
Constructor Summary
Constructors Constructor Description GeoPointChecker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doublecheckLatitude(double latitude)Checks whether aGeoPointlatitude is valid.static doublecheckLongitude(double longitude)Checks whether aGeoPointlongitude is valid.static com.google.apphosting.api.search.DocumentPb.FieldValue.GeocheckValid(com.google.apphosting.api.search.DocumentPb.FieldValue.Geo geoPb)
-
-
-
Method Detail
-
checkLatitude
public static double checkLatitude(double latitude)
Checks whether aGeoPointlatitude is valid. The value must be between -90.0 and 90.0 degrees.- Parameters:
latitude- the latitude to check- Returns:
- the checked latitude
- Throws:
IllegalArgumentException- if the latitude is out of range
-
checkLongitude
public static double checkLongitude(double longitude)
Checks whether aGeoPointlongitude is valid. The value must be between -180.0 and 180.0 degrees.- Parameters:
longitude- the longitude to check- Returns:
- the checked longitude
- Throws:
IllegalArgumentException- if the longitude is out of range
-
checkValid
public static com.google.apphosting.api.search.DocumentPb.FieldValue.Geo checkValid(com.google.apphosting.api.search.DocumentPb.FieldValue.Geo geoPb)
-
-