public class LatLngPropertyType extends PropertyType<LatLng>
dk.heick.properties.types.custom.LatLng. | Constructor Example | Comments | ||
|---|---|---|---|
Property<LatLng> A_PROPERTY = |
Default value is null. |
||
Property<LatLng> A_PROPERTY = |
Default value is new LatLng(25.205,-36.4578). |
||
| Type of value(s) | Examples | Result | Comments |
| Valid | 25.205,-36.4578 | new LatLng(25.205,-36.4578) | Validate successfully. Can parse many formats. |
| Valid | 25.0° 12.0' 18.0"S , 136.0° 07.0' 08.0"E | new LatLng(25.205,-36.4578) | |
| Invalid | cow | null |
Validate will throw an exception. The resulting value is null. |
| Invalid | «empty string» | null |
|
| Invalid | «only spaces» | null |
|
| Invalid | null |
defaultValue OR null |
Validate will throw an exception. Return default value if set, otherwise null. |
LatLng,
GeoUtils,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static char |
LAT_LNG_SEPERATOR
Seperates the Latitude and Longtiude value in a string, default value is a comma, ",".
|
static String |
TYPE
The type name string constant of LatLngPropertyType
|
| Constructor and Description |
|---|
LatLngPropertyType()
Default constructor, no default value.
|
LatLngPropertyType(LatLng defaultValue) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getRestrictions()
Gets a detailed description of the PropertyType with any constraints that might influence the validation.
|
LatLng |
validateValue(String propertyName,
String value)
Converts the string representation of to a typed value.
|
equals, getDefaultValue, getDefaultValueAsString, getDefaultValueDescription, getDescription, getDescription, getInitializationPriority, getIo, getLogger, getTypeName, hasDefaultValue, isDefaultValueValid, postGetValueProcessing, setDefaultValue, setInitializationPriority, setIo, setTypedValue, setTypeName, toString, toType, validate, validateConstraints, validateNullTypepublic static final char LAT_LNG_SEPERATOR
GeoUtils.LAT_LNG_SEPERATOR,
Constant Field Valuespublic static final String TYPE
public LatLngPropertyType()
public LatLngPropertyType(LatLng defaultValue)
defaultValue - public List<String> getRestrictions()
PropertyTypegetRestrictions in class PropertyType<LatLng>public LatLng validateValue(String propertyName, String value) throws PropertyException
PropertyTypevalidateValue in class PropertyType<LatLng>propertyName - the name of the property used for logging purposes. To uniquely identify the Property with validation issues.value - the string representation of the propertyPropertyException - if the conversion failed.