T
- the value type (e.g. String)public class ValuedProperty<T> extends ICalProperty
Modifier and Type | Field and Description |
---|---|
protected T |
value |
parameters
Constructor and Description |
---|
ValuedProperty(T value)
Creates a new valued property.
|
Modifier and Type | Method and Description |
---|---|
T |
getValue()
Gets the value of this property.
|
static <T> T |
getValue(ValuedProperty<T> property)
Gets the value of a
ValuedProperty . |
void |
setValue(T value)
Sets the value of this property.
|
protected void |
validate(List<ICalComponent> components,
ICalVersion version,
List<Warning> warnings)
Checks the property for data consistency problems or deviations from the
spec.
|
addParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, validate
public ValuedProperty(T value)
value
- the property's valuepublic void setValue(T value)
value
- the valueprotected void validate(List<ICalComponent> components, ICalVersion version, List<Warning> warnings)
ICalProperty
Checks the property for data consistency problems or deviations from the spec.
This method should be overridden by child classes that wish to provide validation logic. The default implementation of this method does nothing.
validate
in class ICalProperty
components
- the hierarchy of components that the property belongs
toversion
- the version to validate againstwarnings
- the list to add the warnings topublic static <T> T getValue(ValuedProperty<T> property)
ValuedProperty
.property
- the propertyCopyright © 2013-2015 Michael Angstadt. All Rights Reserved.