Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.fortuna.ical4j.model.component
Class Observance

    java.lang.Object
      net.fortuna.ical4j.model.Component
          net.fortuna.ical4j.model.component.Observance

All Implemented Interfaces:
  Serializable, Comparable

Direct Known Subclasses:
  Daylight, Standard

    public abstract class Observance

extends Component
implements Comparable

Defines an iCalendar sub-component representing a timezone observance. Class made abstract such that only Standard and Daylight instances are valid.

Author:
  Ben Fortuna
See Also:
  Serialized Form

Field Summary
`static String` | `DAYLIGHT`
`static String` | `STANDARD` one of 'standardc' or 'daylightc' MUST occur and each MAY occur more than once.

Fields inherited from class net.fortuna.ical4j.model.Component
`BEGIN, END, EXPERIMENTAL_PREFIX, VALARM, VEVENT, VFREEBUSY, VJOURNAL, VTIMEZONE, VTODO`

Constructor Summary
`protected` | `Observance(String name)` Constructs a timezone observance with the specified name and no properties.
`protected` | `Observance(String name, PropertyList properties)` Constructor protected to enforce use of sub-classes from this library.

Method Summary
`int` | `compareTo(Object arg0)`
`int` | `compareTo(Observance arg0)`
`Date` | `getLatestOnset(Date date)` Returns the latest applicable onset of this observance for the specified date.
`TzOffsetFrom` | `getOffsetFrom()` Returns the mandatory tzoffsetfrom property.
`TzOffsetTo` | `getOffsetTo()` Returns the mandatory tzoffsetto property.
`DtStart` | `getStartDate()` Returns the mandatory dtstart property.
`void` | `validate(boolean recurse)` Perform validation on a component.

Methods inherited from class net.fortuna.ical4j.model.Component
`equals, getName, getProperties, getProperties, getProperty, hashCode, toString, validate, validateProperties`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### STANDARD

    public static final String STANDARD

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

  See Also:
    Constant Field Values

### DAYLIGHT

    public static final String DAYLIGHT

See Also:
  Constant Field Values

Constructor Detail

### Observance

    protected Observance(String name)

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

  Parameters:
    `name` - the name of this observance component

### Observance

    protected Observance(String name,
                         PropertyList properties)

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

  Parameters:
    `name` - the name of the time type
    `properties` - a list of properties

Method Detail

### validate

    public final void validate(boolean recurse)
                        throws ValidationException

  Description copied from class: `Component`
  Perform validation on a component.

  Specified by:
    `validate` in class `Component`
  Parameters:
    `recurse` - indicates whether to validate the component's properties
  Throws:
    `ValidationException` - where the component is not in a valid state
  See Also:
    `Component.validate(boolean)`

### getLatestOnset

    public final Date getLatestOnset(Date date)

  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

### getStartDate

    public final DtStart getStartDate()

  Returns the mandatory dtstart property.

  Returns:

### getOffsetFrom

    public final TzOffsetFrom getOffsetFrom()

  Returns the mandatory tzoffsetfrom property.

  Returns:

### getOffsetTo

    public final TzOffsetTo getOffsetTo()

  Returns the mandatory tzoffsetto property.

  Returns:

### compareTo

    public final int compareTo(Object arg0)

  Specified by:
    `compareTo` in interface `Comparable`

### compareTo

    public final int compareTo(Observance arg0)

  Parameters:
    `arg0` -
  Returns:

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2007 Modularity. All Rights Reserved.