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.getDates().add(new ICalDate(datetime, true)); event.addRecurrenceDates(rdate); //date values Date date = ... RecurrenceDates rdate = new RecurrenceDates(); rdate.getDates().add(new ICalDate(date, false)); event.addRecurrenceDates(rdate); //periods Period period = ... rdate = new RecurrenceDates(); rdate.getPeriods().add(period); event.addRecurrenceDates(rdate);
parameters| Constructor and Description |
|---|
RecurrenceDates() |
RecurrenceDates(RecurrenceDates original)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
RecurrenceDates |
copy()
Creates a copy of this property object.
|
boolean |
equals(Object obj) |
List<ICalDate> |
getDates()
Gets the list that stores this property's recurrence dates.
|
List<Period> |
getPeriods()
Gets the list that stores this property's time periods.
|
int |
hashCode() |
protected Map<String,Object> |
toStringValues()
Gets string representations of the class's fields for the
ICalProperty.toString() method. |
protected void |
validate(List<ICalComponent> components,
ICalVersion version,
List<Warning> warnings)
Checks the property for data consistency problems or deviations from the
specifications.
|
addParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, toString, validatepublic RecurrenceDates()
public RecurrenceDates(RecurrenceDates original)
original - the property to make a copy ofpublic List<ICalDate> getDates()
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 specifications.
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 toprotected Map<String,Object> toStringValues()
ICalProperty
Gets string representations of the class's fields for the
ICalProperty.toString() method.
Meant to be overridden by child classes. The default implementation returns an empty map.
toStringValues in class ICalPropertypublic RecurrenceDates copy()
ICalPropertyCreates a copy of this property object.
The default implementation of this method uses reflection to look for a copy constructor. Child classes SHOULD override this method to avoid the performance overhead involved in using reflection.
The child class's copy constructor, if present, MUST invoke the
ICalProperty.ICalProperty(ICalProperty) super constructor to ensure that the
parameters are also copied.
This method MUST be overridden by the child class if the child class does
not have a copy constructor. Otherwise, an
UnsupportedOperationException will be thrown when an attempt is
made to copy the property (such as in the
ICalendar class's copy constructor
).
copy in class ICalPropertypublic int hashCode()
hashCode in class ICalPropertypublic boolean equals(Object obj)
equals in class ICalPropertyCopyright © 2013-2016 Michael Angstadt. All Rights Reserved.