biweekly.property
Class ValuedProperty<T>

java.lang.Object
  extended by biweekly.property.ICalProperty
      extended by biweekly.property.ValuedProperty<T>
Type Parameters:
T - the value type (e.g. String)
Direct Known Subclasses:
DateTimeProperty, DurationProperty, IntegerProperty, RecurrenceProperty, TextProperty, Xml

public class ValuedProperty<T>
extends ICalProperty

Represents a property whose data model consists of a single object (such as a String).

Author:
Michael Angstadt

Field Summary
protected  T value
           
 
Fields inherited from class biweekly.property.ICalProperty
parameters
 
Constructor Summary
ValuedProperty(T value)
          Creates a new valued property.
 
Method Summary
 T getValue()
          Gets the value of this property.
 void setValue(T value)
          Sets the value 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
 

Field Detail

value

protected T value
Constructor Detail

ValuedProperty

public ValuedProperty(T value)
Creates a new valued property.

Parameters:
value - the property's value
Method Detail

getValue

public T getValue()
Gets the value of this property.

Returns:
the value

setValue

public void setValue(T value)
Sets the value of this property.

Parameters:
value - the value

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.