public class ExceptionDates extends ListProperty<Date>
Defines a list of exceptions to the dates specified in the
RecurrenceRule
property.
Code sample:
VEvent event = new VEvent(); //dates with time components ExceptionDates exdate = new ExceptionDates(true); Date datetime1 = ...; exdate.addValue(datetime1); Date datetime2 = ...; exdate.addValue(datetime2); event.addExceptionDates(exdate); //dates without time components exdate = new ExceptionDates(false); Date date1 = ...; exdate.addValue(date1); Date date2 = ...; exdate.addValue(date2); event.addExceptionDates(exdate);
parameters
Constructor and Description |
---|
ExceptionDates(boolean hasTime)
Creates an exception dates property.
|
Modifier and Type | Method and Description |
---|---|
String |
getTimezoneId()
Gets the timezone identifier.
|
boolean |
hasTime()
Gets whether the dates have time components.
|
void |
setHasTime(boolean hasTime)
Sets whether the dates have time components.
|
void |
setTimezone(VTimezone timezone)
Sets the property's timezone to a timezone that is defined within the
iCalendar object.
|
void |
setTimezoneId(String timezoneId)
Sets the timezone identifier.
|
protected void |
validate(List<ICalComponent> components,
List<Warning> warnings)
Checks the property for data consistency problems or deviations from the
spec.
|
addValue, getValues
addParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, validate
public ExceptionDates(boolean hasTime)
hasTime
- true if the dates have a time component, false if they are
strictly datespublic boolean hasTime()
public void setHasTime(boolean hasTime)
hasTime
- true if the dates have time components, false if they are
strictly datespublic String getTimezoneId()
ICalProperty
TimezoneId
property of a VTimezone
component, or (b)
specifies a globally-defined timezone (e.g. "America/New_York"). For a
list of globally-defined timezones, see the TZ database.public void setTimezoneId(String timezoneId)
ICalProperty
TimezoneId
property of a VTimezone
component, or (b)
specifies a globally-defined timezone (e.g. "America/New_York"). For a
list of globally-defined timezones, see the TZ database.timezoneId
- the timezone identifier (e.g. "America/New_York") or
null to removepublic void setTimezone(VTimezone timezone)
ICalProperty
ICalProperty.setTimezoneId(String)
to use a
globally-defined timezone (e.g. "America/New_York").timezone
- the timezone component to reference or null to removeprotected void validate(List<ICalComponent> components, List<Warning> warnings)
ICalProperty
validate
in class ListProperty<Date>
components
- the hierarchy of components that the property belongs
towarnings
- the list to add the warnings toCopyright © 2013-2014 Michael Angstadt. All Rights Reserved.