Serializable
public abstract class Observance extends Component
Content.Factory
Modifier and Type | Field | Description |
---|---|---|
static String |
DAYLIGHT |
Token for daylight observance.
|
static String |
STANDARD |
one of 'standardc' or 'daylightc' MUST occur and each MAY occur more than once.
|
AVAILABLE, BEGIN, END, EXPERIMENTAL_PREFIX, properties, VALARM, VAVAILABILITY, VEVENT, VFREEBUSY, VJOURNAL, VTIMEZONE, VTODO, VVENUE
Modifier | Constructor | Description |
---|---|---|
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.
|
Modifier and Type | Method | Description |
---|---|---|
OffsetDateTime |
getLatestOnset(Temporal date) |
Returns the latest applicable onset of this observance for the specified date.
|
Optional<TzOffsetFrom> |
getOffsetFrom() |
Deprecated.
|
Optional<TzOffsetTo> |
getOffsetTo() |
Deprecated.
|
Optional<DtStart<LocalDateTime>> |
getStartDate() |
Deprecated.
|
void |
validate(boolean recurse) |
Perform validation on a component.
|
add, calculateRecurrenceSet, copy, equals, getName, getProperties, getProperties, getProperty, getRequiredProperty, getValue, hashCode, newFactory, remove, removeAll, replace, setProperties, toString, validate, validateProperties
public static final String STANDARD
public static final String DAYLIGHT
protected Observance(String name)
name
- the name of this observance componentprotected Observance(String name, PropertyList 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 OffsetDateTime getLatestOnset(Temporal date)
date
- the latest date that an observance onset may occur@Deprecated public final Optional<DtStart<LocalDateTime>> getStartDate()
Component.getProperty(String)
@Deprecated public final Optional<TzOffsetFrom> getOffsetFrom()
Component.getProperty(String)
@Deprecated public final Optional<TzOffsetTo> getOffsetTo()
Component.getProperty(String)