biweekly.property
Class ExceptionDates

java.lang.Object
  extended by biweekly.property.ICalProperty
      extended by biweekly.property.ListProperty<Date>
          extended by biweekly.property.ExceptionDates

public class ExceptionDates
extends ListProperty<Date>

Defines a list of exceptions to the recurrence rule defined in a component.

Examples:

 //date and times
 ExceptionDates exdate = new ExceptionDates(true);
 Date datetime1 = ...;
 exdate.addValue(datetime1);
 Date datetime2 = ...;
 exdate.addValue(datetime2);
 
 //dates
 ExceptionDates exdate = new ExceptionDates(false);
 Date date1 = ...;
 exdate.addValue(date1);
 Date date2 = ...;
 exdate.addValue(date2);
 

Author:
Michael Angstadt
Specification Reference:
RFC 5545 p.118-20

Field Summary
 
Fields inherited from class biweekly.property.ICalProperty
parameters
 
Constructor Summary
ExceptionDates(boolean hasTime)
          Creates an exception dates property.
 
Method Summary
 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<String> warnings)
          Checks the property for data consistency problems or deviations from the spec.
 
Methods inherited from class biweekly.property.ListProperty
addValue, getValues
 
Methods inherited from class biweekly.property.ICalProperty
addParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionDates

public ExceptionDates(boolean hasTime)
Creates an exception dates property.

Parameters:
hasTime - true if the dates have a time component, false if they are strictly dates
Method Detail

hasTime

public boolean hasTime()
Gets whether the dates have time components.

Returns:
true if the dates have time components, false if they are strictly dates

setHasTime

public void setHasTime(boolean hasTime)
Sets whether the dates have time components.

Parameters:
hasTime - true if the dates have time components, false if they are strictly dates

getTimezoneId

public String getTimezoneId()
Description copied from class: ICalProperty
Gets the timezone identifier. This either (a) references the 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.

Returns:
the timezone identifier or null if not set

setTimezoneId

public void setTimezoneId(String timezoneId)
Description copied from class: ICalProperty
Sets the timezone identifier. This either (a) references the 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.

Parameters:
timezoneId - the timezone identifier (e.g. "America/New_York") or null to remove

setTimezone

public void setTimezone(VTimezone timezone)
Description copied from class: ICalProperty
Sets the property's timezone to a timezone that is defined within the iCalendar object. Use ICalProperty.setTimezoneId(String) to use a globally-defined timezone (e.g. "America/New_York").

Parameters:
timezone - the timezone component to reference or null to remove

validate

protected void validate(List<ICalComponent> components,
                        List<String> warnings)
Description copied from class: ICalProperty
Checks the property for data consistency problems or deviations from the spec. Meant to be overridden by child classes that wish to provide validation logic.

Overrides:
validate in class ListProperty<Date>
Parameters:
components - the hierarchy of components that the property belongs to
warnings - the list to add the warnings to


Copyright © 2013 Michael Angstadt. All Rights Reserved.