public class Geo extends ICalProperty
Defines a set of geographical coordinates.
Code sample:
VEvent event = new VEvent(); Geo geo = new Geo(40.714623, -74.006605); event.setGeo(geo);
parameters
Constructor and Description |
---|
Geo(Double latitude,
Double longitude)
Creates a new geo property.
|
Modifier and Type | Method and Description |
---|---|
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<Warning> warnings)
Checks the property for data consistency problems or deviations from the
spec.
|
addParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, validate
public Double getLatitude()
public void setLatitude(Double latitude)
latitude
- the latitudepublic Double getLongitude()
public void setLongitude(Double longitude)
longitude
- the longitudepublic static double toDecimal(int degrees, int minutes, int seconds)
degrees
- the degreesminutes
- the minutesseconds
- the secondsprotected void validate(List<ICalComponent> components, List<Warning> warnings)
ICalProperty
validate
in class ICalProperty
components
- the hierarchy of components that the property belongs
towarnings
- the list to add the warnings toCopyright © 2013-2014 Michael Angstadt. All Rights Reserved.