public abstract class Observance extends Component
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DAYLIGHT
Token for daylight observance.
|
static java.lang.String |
STANDARD
one of 'standardc' or 'daylightc' MUST occur and each MAY occur more than once.
|
Modifier | Constructor and Description |
---|---|
protected |
Observance(java.lang.String name)
Constructs a timezone observance with the specified name and no properties.
|
protected |
Observance(java.lang.String name,
PropertyList<Property> properties)
Constructor protected to enforce use of sub-classes from this library.
|
Modifier and Type | Method and Description |
---|---|
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.
|
calculateRecurrenceSet, copy, equals, getName, getProperties, getProperties, getProperty, getRequiredProperty, hashCode, toString, validate, validateProperties
public static final java.lang.String STANDARD
public static final java.lang.String DAYLIGHT
protected Observance(java.lang.String name)
name
- the name of this observance componentprotected Observance(java.lang.String name, PropertyList<Property> properties)
name
- the name of the time typeproperties
- a list of propertiespublic 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 final Date getLatestOnset(Date date)
date
- the latest date that an observance onset may occurpublic final DtStart getStartDate()
public final TzOffsetFrom getOffsetFrom()
public final TzOffsetTo getOffsetTo()