ezvcard.property
Class SimpleProperty<T>

java.lang.Object
  extended by ezvcard.property.VCardProperty
      extended by 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
           
 
Fields inherited from class ezvcard.property.VCardProperty
group, parameters
 
Constructor Summary
SimpleProperty(T value)
          Creates a valued property
 
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
 

Field Detail

value

protected T value
Constructor Detail

SimpleProperty

public SimpleProperty(T value)
Creates a valued property

Parameters:
value - the value
Method Detail

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 to
version - the version to check the property against
vcard - the vCard this property belongs to


Copyright © 2012-2014 Michael Angstadt. All Rights Reserved.