com.google.appengine.api.search.checkers
Class GeoPointChecker

java.lang.Object
  extended by com.google.appengine.api.search.checkers.GeoPointChecker

public class GeoPointChecker
extends java.lang.Object

Provides checks for GeoPoint.


Field Summary
static double MAXIMUM_NEGATIVE_LATITUDE
          The maximum negative degrees for latitude.
static double MAXIMUM_NEGATIVE_LONGITUDE
          The maximum negative degrees for longitude.
static double MAXIMUM_POSITIVE_LATITUDE
          The maximum positive degrees for latitude.
static double MAXIMUM_POSITIVE_LONGITUDE
          The maximum positive degrees for longitude.
 
Constructor Summary
GeoPointChecker()
           
 
Method Summary
static double checkLatitude(double latitude)
          Checks whether a GoePoint latitude is valid.
static double checkLongitude(double longitude)
          Checks whether a GoePoint longitude is valid.
static DocumentPb.FieldValue.Geo checkValid(DocumentPb.FieldValue.Geo geoPb)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAXIMUM_NEGATIVE_LATITUDE

public static final double MAXIMUM_NEGATIVE_LATITUDE
The maximum negative degrees for latitude.

See Also:
Constant Field Values

MAXIMUM_POSITIVE_LATITUDE

public static final double MAXIMUM_POSITIVE_LATITUDE
The maximum positive degrees for latitude.

See Also:
Constant Field Values

MAXIMUM_NEGATIVE_LONGITUDE

public static final double MAXIMUM_NEGATIVE_LONGITUDE
The maximum negative degrees for longitude.

See Also:
Constant Field Values

MAXIMUM_POSITIVE_LONGITUDE

public static final double MAXIMUM_POSITIVE_LONGITUDE
The maximum positive degrees for longitude.

See Also:
Constant Field Values
Constructor Detail

GeoPointChecker

public GeoPointChecker()
Method Detail

checkLatitude

public static double checkLatitude(double latitude)
Checks whether a GoePoint 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 a GoePoint 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)