ezvcard.property
Class ListProperty<T>

java.lang.Object
  extended by ezvcard.property.VCardProperty
      extended by ezvcard.property.ListProperty<T>
Type Parameters:
T - the type of values sorted in the list
All Implemented Interfaces:
Comparable<VCardProperty>
Direct Known Subclasses:
TextListProperty

public class ListProperty<T>
extends VCardProperty

Represents a property whose value is a list of textual values.

Author:
Michael Angstadt

Field Summary
protected  List<T> values
           
 
Fields inherited from class ezvcard.property.VCardProperty
group, parameters
 
Constructor Summary
ListProperty()
           
 
Method Summary
protected  void _validate(List<Warning> warnings, VCardVersion version, VCard vcard)
          Checks the property for data consistency problems or deviations from the spec.
 void addValue(T value)
          Adds a value to the list.
 List<T> getValues()
          Gest the list of values.
 void removeValue(T value)
          Removes a value from the list.
 
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

values

protected List<T> values
Constructor Detail

ListProperty

public ListProperty()
Method Detail

getValues

public List<T> getValues()
Gest the list of values.

Returns:
the list of values

addValue

public void addValue(T value)
Adds a value to the list.

Parameters:
value - the value to add

removeValue

public void removeValue(T value)
Removes a value from the list.

Parameters:
value - the value to remove

_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.