public class RecurrenceDates extends ICalProperty
Defines a list of dates or time periods that help define a recurrence rule. It must contain either dates or time periods. It cannot contain a combination of both.
Code sample:
VEvent event = new VEvent(); //date-time values Date datetime = ... RecurrenceDates rdate = new RecurrenceDates(); rdate.addDate(new ICalDate(datetime, true)); event.addRecurrenceDates(rdate); //date values Date date = ... RecurrenceDates rdate = new RecurrenceDates(); rdate.addDate(new ICalDate(date, false)); event.addRecurrenceDates(rdate); //periods Period period = ... rdate = new RecurrenceDates(); rdate.addPeriod(period); event.addRecurrenceDates(rdate);
parameters| Constructor and Description |
|---|
RecurrenceDates() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDate(Date date)
Adds a date
|
void |
addDate(ICalDate date)
Adds a date.
|
void |
addPeriod(Period period)
Adds a period
|
List<ICalDate> |
getDates()
Gets the recurrence dates.
|
List<Period> |
getPeriods()
Gets the time periods.
|
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, validatepublic RecurrenceDates()
public List<Period> getPeriods()
protected void validate(List<ICalComponent> components, ICalVersion version, List<Warning> warnings)
ICalPropertyChecks 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 ICalPropertycomponents - 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.