java.lang.Object
net.fortuna.ical4j.model.Content
net.fortuna.ical4j.model.Component
net.fortuna.ical4j.model.component.Observance
- All Implemented Interfaces:
Serializable,Comparable<Component>,FluentComponent,PropertyContainer,PropertyListAccessor,Prototype<Component>,TimeZonePropertyAccessor
$Id$ [05-Apr-2004]
Defines an iCalendar sub-component representing a timezone observance. Class made abstract such that only Standard
and Daylight instances are valid.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class net.fortuna.ical4j.model.Content
Content.Factory -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringToken for daylight observance.static final Stringone of 'standardc' or 'daylightc' MUST occur and each MAY occur more than once.Fields inherited from class net.fortuna.ical4j.model.Component
AVAILABLE, BEGIN, components, END, EXPERIMENTAL_PREFIX, PARTICIPANT, properties, VALARM, VAVAILABILITY, VEVENT, VFREEBUSY, VJOURNAL, VLOCATION, VRESOURCE, VTIMEZONE, VTODO, VVENUEFields inherited from interface net.fortuna.ical4j.model.PropertyContainer
ADD_IF_NOT_PRESENT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedObservance(String name) Constructs a timezone observance with the specified name and no properties.protectedObservance(String name, PropertyList properties) Constructor protected to enforce use of sub-classes from this library. -
Method Summary
Modifier and TypeMethodDescriptionfinal OffsetDateTimegetLatestOnset(Temporal date) Returns the latest applicable onset of this observance for the specified date.validate(boolean recurse) Perform validation on a component.Methods inherited from class net.fortuna.ical4j.model.Component
calculateRecurrenceSet, compareTo, copy, equals, getFluentTarget, getName, getProperties, getPropertyList, getUid, getValue, hashCode, newFactory, setPropertyList, toString, validate, validatePropertiesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.fortuna.ical4j.model.FluentComponent
withPropertyMethods inherited from interface net.fortuna.ical4j.model.PropertyContainer
add, addAll, remove, removeAll, removeIf, replace, setPropertyList, withMethods inherited from interface net.fortuna.ical4j.model.PropertyListAccessor
getProperties, getProperty, getProperty, getPropertyList, getRequiredProperty, getRequiredPropertyMethods inherited from interface net.fortuna.ical4j.model.TimeZonePropertyAccessor
getLastModified, getStartDate, getTimeZoneId, getTimeZoneOffsetFrom, getTimeZoneOffsetTo, getTimeZoneUrl
-
Field Details
-
STANDARD
one of 'standardc' or 'daylightc' MUST occur and each MAY occur more than once.- See Also:
-
DAYLIGHT
Token for daylight observance.- See Also:
-
-
Constructor Details
-
Observance
Constructs a timezone observance with the specified name and no properties.- Parameters:
name- the name of this observance component
-
Observance
Constructor protected to enforce use of sub-classes from this library.- Parameters:
name- the name of the time typeproperties- a list of properties
-
-
Method Details
-
validate
Perform validation on a component.- Specified by:
validatein classComponent- Parameters:
recurse- indicates whether to validate the component's properties- Throws:
ValidationException- where the component is not in a valid state
-
getLatestOnset
Returns the latest applicable onset of this observance for the specified date.- Parameters:
date- the latest date that an observance onset may occur- Returns:
- the latest applicable observance date or null if there is no applicable observance onset for the specified date
-