public class

GeoLat

extends ValueConstruct
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ValueConstruct
       ↳ com.google.gdata.data.geo.GeoLat

Class Overview

Extension for a W3C geo:lat element. It contains the getter/setter for specifying a latitude of a geo-coordinate. The coordinate is contained within the lat element as: <geo:lat>coordinate</geo:lat> . Note that the latitude element does not need to be a child of the geo:Point element. Please see the W3C document http://www.w3.org/2003/01/geo for more information.

See Also

Summary

Constants
int COORDINATE_PRECISION This denotes the number of significant digits after the decimal point for a coordinate when represented by a string.
double MAX_LAT The maximmum acceptable value of a latitude coordinate in degrees.
double MIN_LAT The minimum acceptable value of a latitude coordinate in degrees.
Fields
private static final NumberFormat NUM_FORMAT
private Double lat
[Expand]
Inherited Fields
From class com.google.gdata.data.ValueConstruct
From class com.google.gdata.data.AbstractExtension
Public Constructors
GeoLat()
Creates an instance of the GeoLat extension without a latitude value set.
GeoLat(Double lat)
Creates an immutable instance of GeoLat extension with the coordinate set to the value passed in.
Public Methods
Double getLatitude()
Returns the actual double coordinate for latitude.
void setLatitude(Double latitude)
Sets the latitude represented by this element.
void setValue(String value)
Overrides base implementation by validating that the string represents a latitude coordinate between -90 and 90 degrees.
[Expand]
Inherited Methods
From class com.google.gdata.data.ValueConstruct
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension

Constants

public static final int COORDINATE_PRECISION

This denotes the number of significant digits after the decimal point for a coordinate when represented by a string.

Constant Value: 6 (0x00000006)

public static final double MAX_LAT

The maximmum acceptable value of a latitude coordinate in degrees.

Constant Value: 90.0

public static final double MIN_LAT

The minimum acceptable value of a latitude coordinate in degrees.

Constant Value: -90.0

Fields

private static final NumberFormat NUM_FORMAT

private Double lat

Public Constructors

public GeoLat ()

Creates an instance of the GeoLat extension without a latitude value set.

public GeoLat (Double lat)

Creates an immutable instance of GeoLat extension with the coordinate set to the value passed in.

Parameters
lat The latitude coordinate reprensented by this element.
Throws
IllegalArgumentException if the the latitude is not between -90 and 90.

Public Methods

public Double getLatitude ()

Returns the actual double coordinate for latitude. Note this value is not rounded unlike the value returned by getValue().

Returns
  • the latitude represented by this element.

public void setLatitude (Double latitude)

Sets the latitude represented by this element.

Parameters
latitude The latitude of this element.

public void setValue (String value)

Overrides base implementation by validating that the string represents a latitude coordinate between -90 and 90 degrees. Also formats the the string so that it has a consistent number of significant digits after the decimal point.

Parameters
value New value for the value construct or null to reset.