biweekly.property
Class Geo

java.lang.Object
  extended by biweekly.property.ICalProperty
      extended by biweekly.property.Geo

public class Geo
extends ICalProperty

Defines a set of geographical coordinates.

Examples:

 Geo geo = new Geo(40.714623, -74.006605);
 

Author:
Michael Angstadt
Specification Reference:
RFC 5545 p.85-7

Field Summary
 
Fields inherited from class biweekly.property.ICalProperty
parameters
 
Constructor Summary
Geo(Double latitude, Double longitude)
          Creates a new geo property.
 
Method Summary
 Double getLatitude()
          Gets the latitude.
 Double getLongitude()
          Gets the longitude.
 void setLatitude(Double latitude)
          Sets the latitude.
 void setLongitude(Double longitude)
          Sets the longitude.
static double toDecimal(int degrees, int minutes, int seconds)
          Converts a coordinate in the degrees-minutes-seconds format into its decimal equivalent.
protected  void validate(List<ICalComponent> components, List<String> warnings)
          Checks the property for data consistency problems or deviations from the spec.
 
Methods inherited from class biweekly.property.ICalProperty
addParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Geo

public Geo(Double latitude,
           Double longitude)
Creates a new geo property.

Parameters:
latitude - the latitude
longitude - the longitude
Method Detail

getLatitude

public Double getLatitude()
Gets the latitude.

Returns:
the latitude

setLatitude

public void setLatitude(Double latitude)
Sets the latitude.

Parameters:
latitude - the latitude

getLongitude

public Double getLongitude()
Gets the longitude.

Returns:
the longitude

setLongitude

public void setLongitude(Double longitude)
Sets the longitude.

Parameters:
longitude - the longitude

toDecimal

public static double toDecimal(int degrees,
                               int minutes,
                               int seconds)
Converts a coordinate in the degrees-minutes-seconds format into its decimal equivalent.

Parameters:
degrees - the degrees
minutes - the minutes
seconds - the seconds
Returns:
the decimal value

validate

protected void validate(List<ICalComponent> components,
                        List<String> warnings)
Description copied from class: ICalProperty
Checks the property for data consistency problems or deviations from the spec. Meant to be overridden by child classes that wish to provide validation logic.

Overrides:
validate in class ICalProperty
Parameters:
components - the hierarchy of components that the property belongs to
warnings - the list to add the warnings to


Copyright © 2013 Michael Angstadt. All Rights Reserved.