Class Observance

  • All Implemented Interfaces:
    Serializable, PropertyContainer
    Direct Known Subclasses:
    Daylight, Standard

    public abstract class Observance
    extends Component
    $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:
    Serialized Form
    • Constructor Detail

      • Observance

        protected Observance​(String name)
        Constructs a timezone observance with the specified name and no properties.
        name - the name of this observance component
      • Observance

        protected Observance​(String name,
                             PropertyList<Property> properties)
        Constructor protected to enforce use of sub-classes from this library.
        name - the name of the time type
        properties - a list of properties
    • Method Detail

      • validate

        public final void validate​(boolean recurse)
                            throws ValidationException
        Perform validation on a component.
        Specified by:
        validate in class Component
        recurse - indicates whether to validate the component's properties
        ValidationException - where the component is not in a valid state
      • getLatestOnset

        public final Date getLatestOnset​(Date date)
        Returns the latest applicable onset of this observance for the specified date.
        date - the latest date that an observance onset may occur
        the latest applicable observance date or null if there is no applicable observance onset for the specified date
      • getStartDate

        public final DtStart getStartDate()
        Returns the mandatory dtstart property.
        the DTSTART property or null if not specified
      • getOffsetFrom

        public final TzOffsetFrom getOffsetFrom()
        Returns the mandatory tzoffsetfrom property.
        the TZOFFSETFROM property or null if not specified
      • getOffsetTo

        public final TzOffsetTo getOffsetTo()
        Returns the mandatory tzoffsetto property.
        the TZOFFSETTO property or null if not specified