ezvcard.property
Class SimpleProperty<T>
java.lang.Object
ezvcard.property.VCardProperty
ezvcard.property.SimpleProperty<T>
- Type Parameters:
T
- the class of the property's value
- All Implemented Interfaces:
- Comparable<VCardProperty>
- Direct Known Subclasses:
- Revision, TextProperty, Xml
public class SimpleProperty<T>
- extends VCardProperty
Represents a property whose data model consists of a single Java object.
- Author:
- Michael Angstadt
Field Summary |
protected T |
value
|
Method Summary |
protected void |
_validate(List<Warning> warnings,
VCardVersion version,
VCard vcard)
Checks the property for data consistency problems or deviations from the
spec. |
T |
getValue()
Gets the value of this property. |
void |
setValue(T value)
Sets the value of this property. |
Methods inherited from class ezvcard.property.VCardProperty |
_supportedVersions, addParameter, compareTo, getGroup, getParameter, getParameters, getParameters, getSupportedVersions, removeParameter, setGroup, setParameter, setParameters, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
value
protected T value
SimpleProperty
public SimpleProperty(T value)
- Creates a valued property
- Parameters:
value
- the value
getValue
public T getValue()
- Gets the value of this property.
- Returns:
- the value or null if not set
setValue
public void setValue(T value)
- Sets the value of this property.
- Parameters:
value
- the value
_validate
protected void _validate(List<Warning> warnings,
VCardVersion version,
VCard vcard)
- Description copied from class:
VCardProperty
- 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 VCardProperty
- Parameters:
warnings
- the list to add the warnings toversion
- the version to check the property againstvcard
- the vCard this property belongs to
Copyright © 2012-2014 Michael Angstadt. All Rights Reserved.