Top Description Fields Constructors Methods
net.fortuna.ical4j.model.component

public abstract Class Observance

extends Component
implements TimeZonePropertyAccessor
Class Inheritance
All Implemented Interfaces
net.fortuna.ical4j.model.TimeZonePropertyAccessor, net.fortuna.ical4j.model.PropertyContainer, net.fortuna.ical4j.model.PropertyListAccessor
Known Direct Subclasses
net.fortuna.ical4j.model.component.Standard, net.fortuna.ical4j.model.component.Daylight
Imports
net.fortuna.ical4j.model.*, net.fortuna.ical4j.model.property.*, net.fortuna.ical4j.util.TimeZones, net.fortuna.ical4j.validate.ComponentValidator, .ValidationException, .ValidationResult, org.slf4j.LoggerFactory, java.text.DateFormat, .SimpleDateFormat, java.time.*, java.time.temporal.ChronoField, .Temporal, java.util.ArrayList, .Arrays, .Collections, .List

$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.

Author
Ben Fortuna

Field Summary

Modifier and TypeField and Description
public static final String
DAYLIGHT

Token for daylight observance.

private OffsetDateTime
private OffsetDateTime
private OffsetDateTime[]
private long[]
private static final long
public static final String
STANDARD

one of 'standardc' or 'daylightc' MUST occur and each MAY occur more than once.

private static final DateFormat
private static final String
UTC_PATTERN

Used for parsing times in a UTC date-time representation.

Inherited from net.fortuna.ical4j.model.Component:
AVAILABLEBEGINcomponentsENDEXPERIMENTAL_PREFIXPARTICIPANTpropertiesVALARMVAVAILABILITYVEVENTVFREEBUSYVJOURNALVLOCATIONVRESOURCEVTIMEZONEVTODOVVENUE

Constructor Summary

AccessConstructor and Description
protected
Observance(final String
the name of this observance component
name
)

Constructs a timezone observance with the specified name and no properties.

protected
Observance(final String
the name of the time type
name
,
final PropertyList
a list of properties
properties
)

Constructor protected to enforce use of sub-classes from this library.

Method Summary

Modifier and TypeMethod and Description
private OffsetDateTime

Returns:

a cached onset date or null if no cached onset is applicable for the specified date
getCachedOnset
(final Temporal date)

Returns a cached onset for the specified date.

public final OffsetDateTime

Returns:

the latest applicable observance date or null if there is no applicable observance onset for the specified date
getLatestOnset
(final Temporal
the latest date that an observance onset may occur
date
)

Returns the latest applicable onset of this observance for the specified date.

public ValidationResult
validate(final boolean
indicates whether to validate the component's properties
recurse
)

Implements abstract net.fortuna.ical4j.model.Component.validate.

Perform validation on a component.

Inherited from net.fortuna.ical4j.model.Component:
calculateRecurrenceSetcompareTocopyequalsgetFluentTargetgetNamegetPropertiesgetPropertyListgetUidgetValuehashCodenewFactorysetPropertyListtoStringvalidatevalidateProperties

Field Detail

DAYLIGHTback to summary
public static final String DAYLIGHT

Token for daylight observance.

initialOnsetback to summary
private OffsetDateTime initialOnset
onsetLimitback to summary
private OffsetDateTime onsetLimit
onsetsDatesback to summary
private OffsetDateTime[] onsetsDates
onsetsMillisecback to summary
private long[] onsetsMillisec
serialVersionUIDback to summary
private static final long serialVersionUID

Hides net.fortuna.ical4j.model.Component.serialVersionUID.

STANDARDback to summary
public static final String STANDARD

one of 'standardc' or 'daylightc' MUST occur and each MAY occur more than once.

UTC_FORMATback to summary
private static final DateFormat UTC_FORMAT
UTC_PATTERNback to summary
private static final String UTC_PATTERN

Used for parsing times in a UTC date-time representation.

Constructor Detail

Observanceback to summary
protected Observance(final String name)

Constructs a timezone observance with the specified name and no properties.

Parameters
name:String

the name of this observance component

Observanceback to summary
protected Observance(final String name, final PropertyList properties)

Constructor protected to enforce use of sub-classes from this library.

Parameters
name:String

the name of the time type

properties:PropertyList

a list of properties

Method Detail

getCachedOnsetback to summary
private OffsetDateTime getCachedOnset(final Temporal date)

Returns a cached onset for the specified date.

Returns:OffsetDateTime

a cached onset date or null if no cached onset is applicable for the specified date

getLatestOnsetback to summary
public final OffsetDateTime getLatestOnset(final Temporal date)

Returns the latest applicable onset of this observance for the specified date.

Parameters
date:Temporal

the latest date that an observance onset may occur

Returns:OffsetDateTime

the latest applicable observance date or null if there is no applicable observance onset for the specified date

validateback to summary
public ValidationResult validate(final boolean recurse) throws ValidationException

Implements abstract net.fortuna.ical4j.model.Component.validate.

Doc from net.fortuna.ical4j.model.Component.validate.

Perform validation on a component.

Parameters
recurse:boolean

indicates whether to validate the component's properties

Annotations
@Override
Exceptions
ValidationException:
where the component is not in a valid state