public class PlaceProperty extends VCardProperty implements HasAltId
Modifier and Type | Field and Description |
---|---|
protected GeoUri |
geoUri |
protected String |
text |
protected String |
uri |
group, parameters
Constructor and Description |
---|
PlaceProperty()
Creates a new place property.
|
PlaceProperty(double latitude,
double longitude)
Creates a new place property.
|
PlaceProperty(PlaceProperty original)
Copy constructor.
|
PlaceProperty(String text)
Creates a new place property.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_validate(List<ValidationWarning> warnings,
VCardVersion version,
VCard vcard)
Checks the property for data consistency problems or deviations from the
spec.
|
boolean |
equals(Object obj) |
String |
getAltId()
Gets the property's ALTID parameter.
|
GeoUri |
getGeoUri()
Gets the location's geo position.
|
String |
getLanguage()
Gets the language that the property value is written in.
|
Double |
getLatitude()
Gets the latitude of the location.
|
Double |
getLongitude()
Gets the longitude of the location.
|
String |
getText()
Gets the text value representing the location.
|
String |
getUri()
Gets the URI representing the location.
|
int |
hashCode() |
void |
setAltId(String altId)
Sets the property's ALTID parameter.
|
void |
setCoordinates(double latitude,
double longitude)
Sets the property's value to a set of geo coordinates.
|
void |
setGeoUri(GeoUri geoUri)
Sets the property's value to a set of geo coordinates.
|
void |
setLanguage(String language)
Sets the language that the property value is written in.
|
void |
setText(String text)
Sets the property's value to a text value.
|
void |
setUri(String uri)
Sets the property's value to a URI.
|
protected Map<String,Object> |
toStringValues()
Gets string representations of the class's fields for the
VCardProperty.toString() method. |
addParameter, compareTo, copy, getGroup, getParameter, getParameters, getParameters, getSupportedVersions, isSupportedBy, removeParameter, setGroup, setParameter, setParameters, toString, validate
public PlaceProperty()
public PlaceProperty(double latitude, double longitude)
latitude
- the latitude coordinate of the placelongitude
- the longitude coordinate of the placepublic PlaceProperty(String text)
text
- a text value representing the placepublic PlaceProperty(PlaceProperty original)
original
- the property to make a copy ofpublic Double getLatitude()
public Double getLongitude()
public GeoUri getGeoUri()
public void setCoordinates(double latitude, double longitude)
latitude
- the latitudelongitude
- the longitudepublic void setGeoUri(GeoUri geoUri)
geoUri
- the geo URIpublic String getUri()
public String getText()
public void setText(String text)
text
- the textpublic String getAltId()
HasAltId
Supported versions: 4.0
getAltId
in interface HasAltId
VCardParameters.getAltId()
public void setAltId(String altId)
HasAltId
Supported versions: 4.0
setAltId
in interface HasAltId
altId
- the ALTID or null to removeVCardParameters.setAltId(java.lang.String)
public String getLanguage()
VCardProperty
public void setLanguage(String language)
VCardProperty
language
- the language or null to removeprotected void _validate(List<ValidationWarning> warnings, VCardVersion version, VCard vcard)
VCardProperty
_validate
in class VCardProperty
warnings
- the list to add the warnings toversion
- the version to check the property againstvcard
- the vCard this property belongs toprotected Map<String,Object> toStringValues()
VCardProperty
Gets string representations of the class's fields for the
VCardProperty.toString()
method.
Meant to be overridden by child classes. The default implementation returns an empty map.
toStringValues
in class VCardProperty
public int hashCode()
hashCode
in class VCardProperty
public boolean equals(Object obj)
equals
in class VCardProperty
Copyright © 2012–2023 Michael Angstadt. All rights reserved.