public class RawProperty extends TextProperty
value
group, parameters
Constructor and Description |
---|
RawProperty(RawProperty original)
Copy constructor.
|
RawProperty(String propertyName,
String value)
Creates a raw property.
|
RawProperty(String propertyName,
String value,
VCardDataType dataType)
Creates a raw 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.
|
RawProperty |
copy()
Creates a copy of this property object.
|
boolean |
equals(Object obj) |
VCardDataType |
getDataType()
Gets the data type of the property's value.
|
String |
getPropertyName()
Gets the name of the property.
|
int |
hashCode() |
void |
setDataType(VCardDataType dataType)
Sets the data type of the property's value.
|
void |
setPropertyName(String propertyName)
Sets the name of the property.
|
protected Map<String,Object> |
toStringValues()
Gets string representations of the class's fields for the
VCardProperty.toString() method. |
getValue, setValue
addParameter, compareTo, getGroup, getParameter, getParameters, getParameters, getSupportedVersions, isSupportedBy, removeParameter, setGroup, setParameter, setParameters, toString, validate
public RawProperty(String propertyName, String value)
propertyName
- the property name (e.g. "X-GENDER")value
- the property valuepublic RawProperty(String propertyName, String value, VCardDataType dataType)
propertyName
- the property name (e.g. "X-GENDER")value
- the property valuedataType
- the value's data typepublic RawProperty(RawProperty original)
original
- the property to make a copy ofpublic String getPropertyName()
public void setPropertyName(String propertyName)
propertyName
- the property namepublic VCardDataType getDataType()
public void setDataType(VCardDataType dataType)
dataType
- the data type or null if unknownprotected void _validate(List<ValidationWarning> warnings, VCardVersion version, VCard vcard)
VCardProperty
_validate
in class SimpleProperty<String>
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 SimpleProperty<String>
public RawProperty copy()
VCardProperty
Creates a copy of this property object.
The default implementation of this method uses reflection to look for a copy constructor. Child classes SHOULD override this method to avoid the performance overhead involved in using reflection.
The child class's copy constructor, if present, MUST invoke the
VCardProperty.VCardProperty(VCardProperty)
super constructor to ensure that
the group name and parameters are also copied.
This method MUST be overridden by the child class if the child class does
not have a copy constructor. Otherwise, an
UnsupportedOperationException
will be thrown when an attempt is
made to copy the property (such as in the VCard
class's copy constructor
).
copy
in class VCardProperty
public int hashCode()
hashCode
in class SimpleProperty<String>
public boolean equals(Object obj)
equals
in class SimpleProperty<String>
Copyright © 2012–2023 Michael Angstadt. All rights reserved.