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

public Class VTimeZone

extends CalendarComponent
implements Prototype<VTimeZone>, ComponentContainer<Observance>, TimeZonePropertyAccessor
Class Inheritance
All Implemented Interfaces
net.fortuna.ical4j.model.TimeZonePropertyAccessor, net.fortuna.ical4j.model.PropertyContainer, net.fortuna.ical4j.model.PropertyListAccessor, net.fortuna.ical4j.model.ComponentContainer, net.fortuna.ical4j.model.ComponentListAccessor, net.fortuna.ical4j.model.Prototype
Imports
net.fortuna.ical4j.model.*, net.fortuna.ical4j.model.property.Method, net.fortuna.ical4j.validate.ValidationException, .ValidationResult, .Validator, net.fortuna.ical4j.validate.component.VTimeZoneValidator, org.apache.commons.lang3.builder.HashCodeBuilder, java.time.OffsetDateTime, java.time.temporal.Temporal, java.util.List, .Objects, java.util.stream.Collectors

$Id$ [Apr 5, 2004] Defines an iCalendar VTIMEZONE component.
      4.6.5 Time Zone Component

         Component Name: VTIMEZONE

         Purpose: Provide a grouping of component properties that defines a
         time zone.

         Formal Definition: A "VTIMEZONE" calendar component is defined by the
         following notation:

           timezonec  = "BEGIN" ":" "VTIMEZONE" CRLF

                        2*(

                        ; 'tzid' is required, but MUST NOT occur more
                        ; than once

                      tzid /

                        ; 'last-mod' and 'tzurl' are optional,
                      but MUST NOT occur more than once

                      last-mod / tzurl /

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

                      standardc / daylightc /

                      ; the following is optional,
                      ; and MAY occur more than once

                        x-prop

                        )

                        "END" ":" "VTIMEZONE" CRLF

           standardc  = "BEGIN" ":" "STANDARD" CRLF

                        tzprop

                        "END" ":" "STANDARD" CRLF

           daylightc  = "BEGIN" ":" "DAYLIGHT" CRLF

                        tzprop

                        "END" ":" "DAYLIGHT" CRLF

           tzprop     = 3*(

                      ; the following are each REQUIRED,
                      ; but MUST NOT occur more than once

                      dtstart / tzoffsetto / tzoffsetfrom /

                      ; the following are optional,
                      ; and MAY occur more than once

                      comment / rdate / rrule / tzname / x-prop

                      )
Author
Ben Fortuna

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private static final Validator<VTimeZone>
private static final long
Inherited from net.fortuna.ical4j.model.component.CalendarComponent:
EMPTY_VALIDATOR

Constructor Summary

AccessConstructor and Description
public
VTimeZone()

Default constructor.

public
VTimeZone(final PropertyList
a list of properties
properties
)

Constructs a new instance containing the specified properties.

public
VTimeZone(final ComponentList<Observance>
a list of type components
observances
)

Constructs a new vtimezone component with no properties and the specified list of type components.

public
VTimeZone(final PropertyList
a list of properties
properties
,
final ComponentList<Observance>
a list of timezone types
observances
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public VTimeZone
copy()

Overrides net.fortuna.ical4j.model.Component.copy.

Implements net.fortuna.ical4j.model.Prototype.copy.

Create a (deep) copy of this component.

public boolean
equals(final Object
the reference object with which to compare.
arg0
)

Overrides net.fortuna.ical4j.model.Component.equals.

Indicates whether some other object is "equal to" this one.

public final Observance

Returns:

the latest applicable timezone observance for the specified date or null if there are no applicable observances
getApplicableObservance
(final Temporal
the latest possible date for a timezone observance onset
date
)

Returns the latest applicable timezone observance for the specified date.

public static Observance

Returns:

the latest applicable timezone observance for the specified date or null if there are no applicable observances
getApplicableObservance
(final Temporal
the latest possible date for a timezone observance onset
date
,
List<Observance>
a list of observances to choose from
observances
)

Returns the latest applicable timezone observance for the specified date.

public ComponentList<Observance>

Returns:

Returns the underlying component list.
getComponentList
()

Implements net.fortuna.ical4j.model.ComponentListAccessor.getComponentList.

public final List<Observance>

Returns:

Returns the types.
getObservances
()

public int
hashCode()

Overrides net.fortuna.ical4j.model.Component.hashCode.

Returns a hash code value for this object.

protected ComponentFactory<VTimeZone>
newFactory()

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

Returns a new component factory used to create deep copies.

public void
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.

public ValidationResult
validate(Method
the applicable method
method
)

Overrides net.fortuna.ical4j.model.component.CalendarComponent.validate.

Performs method-specific ITIP validation.

Inherited from net.fortuna.ical4j.model.component.CalendarComponent:
validateAddvalidateCancelvalidateCountervalidateDeclineCountervalidatePublishvalidateRefreshvalidateReplyvalidateRequest

Field Detail

itipValidatorback to summary
private static final Validator<VTimeZone> itipValidator
serialVersionUIDback to summary
private static final long serialVersionUID

Hides net.fortuna.ical4j.model.component.CalendarComponent.serialVersionUID.

Constructor Detail

VTimeZoneback to summary
public VTimeZone()

Default constructor.

VTimeZoneback to summary
public VTimeZone(final PropertyList properties)

Constructs a new instance containing the specified properties.

Parameters
properties:PropertyList

a list of properties

VTimeZoneback to summary
public VTimeZone(final ComponentList<Observance> observances)

Constructs a new vtimezone component with no properties and the specified list of type components.

Parameters
observances:ComponentList<Observance>

a list of type components

VTimeZoneback to summary
public VTimeZone(final PropertyList properties, final ComponentList<Observance> observances)

Constructor.

Parameters
properties:PropertyList

a list of properties

observances:ComponentList<Observance>

a list of timezone types

Method Detail

copyback to summary
public VTimeZone copy()

Overrides net.fortuna.ical4j.model.Component.copy.

Implements net.fortuna.ical4j.model.Prototype.copy.

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

Create a (deep) copy of this component.

Returns:VTimeZone

the component copy

Annotations
@Override
equalsback to summary
public boolean equals(final Object arg0)

Overrides net.fortuna.ical4j.model.Component.equals.

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

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
arg0:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getApplicableObservanceback to summary
public final Observance getApplicableObservance(final Temporal date)

Returns the latest applicable timezone observance for the specified date.

Parameters
date:Temporal

the latest possible date for a timezone observance onset

Returns:Observance

the latest applicable timezone observance for the specified date or null if there are no applicable observances

getApplicableObservanceback to summary
public static Observance getApplicableObservance(final Temporal date, List<Observance> observances)

Returns the latest applicable timezone observance for the specified date.

Parameters
date:Temporal

the latest possible date for a timezone observance onset

observances:List<Observance>

a list of observances to choose from

Returns:Observance

the latest applicable timezone observance for the specified date or null if there are no applicable observances

getComponentListback to summary
public ComponentList<Observance> getComponentList()

Implements net.fortuna.ical4j.model.ComponentListAccessor.getComponentList.

Returns:ComponentList<Observance>

Returns the underlying component list.

Annotations
@Override
getObservancesback to summary
public final List<Observance> getObservances()
Returns:List<Observance>

Returns the types.

hashCodeback to summary
public int hashCode()

Overrides net.fortuna.ical4j.model.Component.hashCode.

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

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object

Annotations
@Override
newFactoryback to summary
protected ComponentFactory<VTimeZone> newFactory()

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

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

Returns a new component factory used to create deep copies.

Returns:ComponentFactory<VTimeZone>

a component factory instance

Annotations
@Override
setComponentListback to summary
public void setComponentList(ComponentList<Observance> components)

Implements net.fortuna.ical4j.model.ComponentContainer.setComponentList.

Annotations
@Override
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
validateback to summary
public ValidationResult validate(Method method) throws ValidationException

Overrides net.fortuna.ical4j.model.component.CalendarComponent.validate.

Doc from net.fortuna.ical4j.model.component.CalendarComponent.validate.

Performs method-specific ITIP validation.

Parameters
method:Method

the applicable method

Annotations
@Override
Exceptions
ValidationException:
where the component does not comply with RFC2446
net.fortuna.ical4j.model.component back to summary

public Class VTimeZone.Factory

extends Factory
implements ComponentFactory<VTimeZone>
Class Inheritance
All Implemented Interfaces
net.fortuna.ical4j.model.ComponentFactory

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public VTimeZone
public VTimeZone
public VTimeZone
Inherited from net.fortuna.ical4j.model.Content.Factory:
supports

Constructor Detail

Factoryback to summary
public Factory()

Method Detail

createComponentback to summary
public VTimeZone createComponent()

Implements net.fortuna.ical4j.model.ComponentFactory.createComponent.

Annotations
@Override
createComponentback to summary
public VTimeZone createComponent(PropertyList properties)

Implements net.fortuna.ical4j.model.ComponentFactory.createComponent.

Annotations
@Override
createComponentback to summary
public VTimeZone createComponent(PropertyList properties, ComponentList<?> subComponents)

Overrides default net.fortuna.ical4j.model.ComponentFactory.createComponent.

Annotations
@Override
@SuppressWarnings:unchecked