Serializable
public class VTimeZone extends CalendarComponent
4.6.5 Time Zone Component Component Name: VTIMEZONE Purpose: Provide a grouping of component properties that defines a time zone. Formal Definition: A "VTIMEZONE" calendar component is defined by the following notation: timezonec = "BEGIN" ":" "VTIMEZONE" CRLF 2*( ; 'tzid' is required, but MUST NOT occur more ; than once tzid / ; 'last-mod' and 'tzurl' are optional, but MUST NOT occur more than once last-mod / tzurl / ; one of 'standardc' or 'daylightc' MUST occur ..; and each MAY occur more than once. standardc / daylightc / ; the following is optional, ; and MAY occur more than once x-prop ) "END" ":" "VTIMEZONE" CRLF standardc = "BEGIN" ":" "STANDARD" CRLF tzprop "END" ":" "STANDARD" CRLF daylightc = "BEGIN" ":" "DAYLIGHT" CRLF tzprop "END" ":" "DAYLIGHT" CRLF tzprop = 3*( ; the following are each REQUIRED, ; but MUST NOT occur more than once dtstart / tzoffsetto / tzoffsetfrom / ; the following are optional, ; and MAY occur more than once comment / rdate / rrule / tzname / x-prop )
Modifier and Type | Class | Description |
---|---|---|
static class |
VTimeZone.Factory |
EMPTY_VALIDATOR
AVAILABLE, BEGIN, END, EXPERIMENTAL_PREFIX, properties, VALARM, VAVAILABILITY, VEVENT, VFREEBUSY, VJOURNAL, VTIMEZONE, VTODO, VVENUE
Constructor | Description |
---|---|
VTimeZone() |
Default constructor.
|
VTimeZone(ComponentList<Observance> observances) |
Constructs a new vtimezone component with no properties and the specified list of type components.
|
VTimeZone(PropertyList properties) |
Constructs a new instance containing the specified properties.
|
VTimeZone(PropertyList properties,
ComponentList<Observance> observances) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
void |
add(Observance observance) |
Add an observance definition to the timezone.
|
VTimeZone |
copy() |
Overrides default copy method to add support for copying observance sub-components.
|
boolean |
equals(Object arg0) |
|
Observance |
getApplicableObservance(Temporal date) |
Returns the latest applicable timezone observance for the specified date.
|
static Observance |
getApplicableObservance(Temporal date,
List<Observance> observances) |
Returns the latest applicable timezone observance for the specified date.
|
Optional<LastModified> |
getLastModified() |
Deprecated.
|
ComponentList<Observance> |
getObservances() |
|
Optional<TzId> |
getTimeZoneId() |
Deprecated.
|
Optional<TzUrl> |
getTimeZoneUrl() |
Deprecated.
|
int |
hashCode() |
|
protected ComponentFactory<VTimeZone> |
newFactory() |
Returns a new component factory used to create deep copies.
|
String |
toString() |
|
void |
validate(boolean recurse) |
Perform validation on a component.
|
void |
validate(Method method) |
Performs method-specific ITIP validation.
|
validateAdd, validateCancel, validateCounter, validateDeclineCounter, validatePublish, validateRefresh, validateReply, validateRequest
add, calculateRecurrenceSet, getName, getProperties, getProperties, getProperty, getRequiredProperty, getValue, remove, removeAll, replace, setProperties, validate, validateProperties
public VTimeZone()
public VTimeZone(PropertyList properties)
properties
- a list of propertiespublic VTimeZone(ComponentList<Observance> observances)
observances
- a list of type componentspublic VTimeZone(PropertyList properties, ComponentList<Observance> observances)
properties
- a list of propertiesobservances
- a list of timezone typespublic void add(Observance observance)
observance
- the definition to addpublic final void validate(boolean recurse) throws ValidationException
validate
in class Component
recurse
- indicates whether to validate the component's propertiesValidationException
- where the component is not in a valid statepublic void validate(Method method) throws ValidationException
CalendarComponent
validate
in class CalendarComponent
method
- the applicable methodValidationException
- where the component does not comply with RFC2446public final ComponentList<Observance> getObservances()
public final Observance getApplicableObservance(Temporal date)
date
- the latest possible date for a timezone observance onsetpublic static Observance getApplicableObservance(Temporal date, List<Observance> observances)
date
- the latest possible date for a timezone observance onsetobservances
- a list of observances to choose from@Deprecated public final Optional<TzId> getTimeZoneId()
Component.getProperty(String)
@Deprecated public final Optional<LastModified> getLastModified()
Component.getProperty(String)
@Deprecated public final Optional<TzUrl> getTimeZoneUrl()
Component.getProperty(String)
public VTimeZone copy()
copy
in class Component
Component.copy()
protected ComponentFactory<VTimeZone> newFactory()
Component
newFactory
in class Component