biweekly.property
Class ListProperty<T>

java.lang.Object
  extended by biweekly.property.ICalProperty
      extended by biweekly.property.ListProperty<T>
Type Parameters:
T - the value type
Direct Known Subclasses:
Categories, ExceptionDates, Resources

public class ListProperty<T>
extends ICalProperty

Represents a property whose value is a list of values.

Author:
Michael Angstadt

Field Summary
 
Fields inherited from class biweekly.property.ICalProperty
parameters
 
Constructor Summary
ListProperty()
          Creates a new list property.
ListProperty(List<T> values)
          Creates a new list property.
ListProperty(T... values)
          Creates a new list property.
 
Method Summary
 void addValue(T value)
          Adds a value to this property.
 List<T> getValues()
          Gets the values of this property.
protected  void validate(List<ICalComponent> components, List<String> warnings)
          Checks the property for data consistency problems or deviations from the spec.
 
Methods inherited from class biweekly.property.ICalProperty
addParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListProperty

public ListProperty()
Creates a new list property.


ListProperty

public ListProperty(T... values)
Creates a new list property.

Parameters:
values - the values to initialize the property with

ListProperty

public ListProperty(List<T> values)
Creates a new list property.

Parameters:
values - the values to initialize the property with
Method Detail

addValue

public void addValue(T value)
Adds a value to this property.

Parameters:
value - the value to add

getValues

public List<T> getValues()
Gets the values of this property.

Returns:
the values

validate

protected void validate(List<ICalComponent> components,
                        List<String> warnings)
Description copied from class: ICalProperty
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 ICalProperty
Parameters:
components - the hierarchy of components that the property belongs to
warnings - the list to add the warnings to


Copyright © 2013 Michael Angstadt. All Rights Reserved.