public abstract class ICalProperty extends Object
Modifier and Type | Field and Description |
---|---|
protected ICalParameters |
parameters
The property parameters.
|
Constructor and Description |
---|
ICalProperty() |
Modifier and Type | Method and Description |
---|---|
void |
addParameter(String name,
String value)
Adds a value to a parameter.
|
String |
getParameter(String name)
Gets the first value of a parameter with the given name.
|
ICalParameters |
getParameters()
Gets the property's parameters.
|
List<String> |
getParameters(String name)
Gets all values of a parameter with the given name.
|
void |
removeParameter(String name)
Removes a parameter from the property.
|
void |
setParameter(String name,
Collection<String> values)
Replaces all existing values of a parameter with the given values.
|
void |
setParameter(String name,
String value)
Replaces all existing values of a parameter with the given value.
|
void |
setParameters(ICalParameters parameters)
Sets the property's parameters
|
List<Warning> |
validate(List<ICalComponent> components,
ICalVersion version)
Checks the property for data consistency problems or deviations from the
spec.
|
protected void |
validate(List<ICalComponent> components,
ICalVersion version,
List<Warning> warnings)
Checks the property for data consistency problems or deviations from the
spec.
|
protected ICalParameters parameters
public ICalProperty()
public ICalParameters getParameters()
public void setParameters(ICalParameters parameters)
parameters
- the parameterspublic String getParameter(String name)
name
- the parameter name (case insensitive, e.g. "LANGUAGE")public List<String> getParameters(String name)
name
- the parameter name (case insensitive, e.g. "LANGUAGE")public void addParameter(String name, String value)
name
- the parameter name (case insensitive, e.g. "LANGUAGE")value
- the parameter valuepublic void setParameter(String name, String value)
name
- the parameter name (case insensitive, e.g. "LANGUAGE")value
- the parameter valuepublic void setParameter(String name, Collection<String> values)
name
- the parameter name (case insensitive, e.g. "LANGUAGE")values
- the parameter valuespublic void removeParameter(String name)
name
- the parameter name (case insensitive, e.g. "LANGUAGE")public final List<Warning> validate(List<ICalComponent> components, ICalVersion version)
components
- the hierarchy of components that the property belongs
toversion
- the version to validate againstICalendar.validate(biweekly.ICalVersion)
protected void validate(List<ICalComponent> components, ICalVersion version, List<Warning> warnings)
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.
components
- the hierarchy of components that the property belongs
toversion
- the version to validate againstwarnings
- the list to add the warnings toCopyright © 2013-2015 Michael Angstadt. All Rights Reserved.