public class TimezoneInfo extends Object
Constructor and Description |
---|
TimezoneInfo() |
Modifier and Type | Method and Description |
---|---|
void |
assign(VTimezone component,
TimeZone timezone)
|
VTimezone |
getComponent(ICalProperty property)
Gets the
VTimezone component that a property is assigned to. |
Collection<VTimezone> |
getComponents()
Gets all of the iCalendar
VTimezone components that have been
registered or generated by this class. |
VTimezoneGenerator |
getGenerator()
Gets the timezone generator.
|
TimeZone |
getTimeZone(ICalProperty property)
Gets the timezone that is assigned to a property.
|
TimeZone |
getTimeZoneByComponent(VTimezone component)
|
TimeZone |
getTimeZoneById(String id)
Gets a timezone with a given ID.
|
TimeZone |
getTimeZoneToWriteIn(ICalProperty property)
Gets the timezone that a property should be formatted in when written.
|
boolean |
hasSolidusTimezone(ICalProperty property)
Determines if the given property has a solidus timezone (a globally
unique timezone ID).
|
boolean |
isFloating(ICalProperty property)
Determines if a property value should be formatted in floating time or
not.
|
void |
setDefaultTimeZone(TimeZone timezone)
Sets the timezone to format all date/time values in.
|
void |
setFloating(ICalProperty property,
boolean enable)
Instructs the writer to format a particular property's date/time value in
floating time.
|
void |
setGenerator(VTimezoneGenerator generator)
Sets the timezone generator.
|
void |
setGlobalFloatingTime(boolean enable)
Sets whether to format all date/time values as floating times.
|
void |
setTimeZone(ICalProperty property,
TimeZone timezone)
Instructs the writer to format an individual property's date/time value
in a specific timezone.
|
void |
setTimeZone(ICalProperty property,
TimeZone timezone,
boolean generateComponent)
Instructs the writer to format an individual property's date/time value
in a specific timezone.
|
public TimezoneInfo()
public void assign(VTimezone component, TimeZone timezone)
component
- the timezone componenttimezone
- the timezone objectpublic void setDefaultTimeZone(TimeZone timezone)
VTimezone
component if one has not already
been assigned to the given timezone (see
assign()
).timezone
- the timezone object or null for UTC (default)IllegalArgumentException
- if a VTimezone
component could
not be generatedpublic void setGlobalFloatingTime(boolean enable)
enable
- true to enable, false to disable (default)public void setTimeZone(ICalProperty property, TimeZone timezone)
property
- the propertytimezone
- the timezone or null to format the property according to
the default timezone (default)public void setTimeZone(ICalProperty property, TimeZone timezone, boolean generateComponent)
property
- the propertytimezone
- the timezone or null to format the property according to
the default timezone (default)generateComponent
- true to associate the property with a
VTimezone
component containing the timezone definition
(recommended), false not to. If the "timezone" parameter is null, then
this parameter has no effectpublic TimeZone getTimeZone(ICalProperty property)
property
- the propertypublic boolean hasSolidusTimezone(ICalProperty property)
property
- the propertypublic TimeZone getTimeZoneToWriteIn(ICalProperty property)
isFloating(biweekly.property.ICalProperty)
first, to check to see if the
property's value is floating (without a timezone).property
- the propertypublic TimeZone getTimeZoneById(String id)
id
- the IDpublic TimeZone getTimeZoneByComponent(VTimezone component)
component
- the componentpublic VTimezone getComponent(ICalProperty property)
VTimezone
component that a property is assigned to.property
- the propertypublic void setFloating(ICalProperty property, boolean enable)
property
- the property whose value should be formatted as a
floating time valueenable
- true to enable floating time for this property, false to
disable (default)public boolean isFloating(ICalProperty property)
property
- the propertypublic Collection<VTimezone> getComponents()
VTimezone
components that have been
registered or generated by this class.public VTimezoneGenerator getGenerator()
public void setGenerator(VTimezoneGenerator generator)
generator
- the timezone generatorCopyright © 2013-2015 Michael Angstadt. All Rights Reserved.