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