AnnualTimeZoneRule is a class used for representing a time zone
rule which takes effect annually. Years used in this class are
all Gregorian calendar years.
| Modifier and Type | Field and Description |
|---|---|
| private final DateTimeRule | |
| private final int | |
| public static final int | MAX_YEAR
The constant representing the maximum year used for designating a rule is permanent. |
| private static final long | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public | AnnualTimeZoneRule(String
The time zone name. name, int The GMT offset of its standard time in milliseconds. rawOffset, int The amount of daylight saving offset adjustment in
milliseconds. If this ia a rule for standard time,
the value of this argument is 0. dstSavings, DateTimeRule The start date/time rule repeated annually. dateTimeRule, int The first year when this rule takes effect. startYear, int The last year when this rule takes effect. If this
rule is effective forever in future, specify MAX_YEAR. endYear)Constructs a |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: The end year of this rule (inclusive). The year is in Gregorian calendar with 0 == 1 BCE, -1 == 2 BCE, etc.Gets the end year when this rule takes effect. |
| public Date | getFinalStart(int
The standard time offset from UTC before this rule
takes effect in milliseconds. prevRawOffset, int The amount of daylight saving offset from the
standard time. prevDSTSavings)Implements abstract com. |
| public Date | getFirstStart(int
The standard time offset from UTC before this rule
takes effect in milliseconds. prevRawOffset, int The amount of daylight saving offset from the
standard time. prevDSTSavings)Implements abstract com. |
| public Date | getNextStart(long
The first time after this time is returned. base, int The standard time offset from UTC before this rule
takes effect in milliseconds. prevRawOffset, int The amount of daylight saving offset from the
standard time. prevDSTSavings, boolean Whether the base time is inclusive or not. inclusive)Implements abstract com. |
| public Date | getPreviousStart(long
The most recent time when this rule takes effect before
this time is returned. base, int The standard time offset from UTC before this rule
takes effect in milliseconds. prevRawOffset, int The amount of daylight saving offset from the
standard time. prevDSTSavings, boolean Whether the base time is inclusive or not. inclusive)Implements abstract com. |
| public DateTimeRule | Returns: AnAnnualDateTimeRule which represents the start date/time
rule used by this time zone rule.Gets the start date/time rule associated used by this rule. |
| public Date | Returns: The time when this rule takes effect in the year, or null if this rule is not applicable in the year.The Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc. year, int The standard time offset from UTC before this rule
takes effect in milliseconds. prevRawOffset, int The amount of daylight saving offset from the
standard time. prevDSTSavings)Gets the time when this rule takes effect in the given year. |
| public int | Returns: The start year of this rule. The year is in Gregorian calendar with 0 == 1 BCE, -1 == 2 BCE, etc.Gets the first year when this rule takes effect. |
| public boolean | isEquivalentTo(TimeZoneRule
The other)TimeZoneRule object to be compared with.Overrides com. |
| public boolean | isTransitionRule()
Implements abstract com. TimeZoneRule has one or more start times.
|
| public String | toString()
Overrides com. String representation of this AnnualTimeZoneRule object.
|
| dateTimeRule | back to summary |
|---|---|
| private final DateTimeRule dateTimeRule | |
| endYear | back to summary |
|---|---|
| private final int endYear | |
| MAX_YEAR | back to summary |
|---|---|
| public static final int MAX_YEAR The constant representing the maximum year used for designating a rule is permanent.
| |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| startYear | back to summary |
|---|---|
| private final int startYear | |
| AnnualTimeZoneRule | back to summary |
|---|---|
| public AnnualTimeZoneRule(String name, int rawOffset, int dstSavings, DateTimeRule dateTimeRule, int startYear, int endYear) Constructs a
| |
| getEndYear | back to summary |
|---|---|
| public int getEndYear() Gets the end year when this rule takes effect.
| |
| getFinalStart | back to summary |
|---|---|
| public Date getFinalStart(int prevRawOffset, int prevDSTSavings) Implements abstract com. Doc from com. Gets the final time when this rule takes effect.
| |
| getFirstStart | back to summary |
|---|---|
| public Date getFirstStart(int prevRawOffset, int prevDSTSavings) Implements abstract com. Doc from com. Gets the very first time when this rule takes effect. | |
| getNextStart | back to summary |
|---|---|
| public Date getNextStart(long base, int prevRawOffset, int prevDSTSavings, boolean inclusive) Implements abstract com. Doc from com. Gets the first time when this rule takes effect after the specified time.
| |
| getPreviousStart | back to summary |
|---|---|
| public Date getPreviousStart(long base, int prevRawOffset, int prevDSTSavings, boolean inclusive) Implements abstract com. Doc from com. Gets the most recent time when this rule takes effect before the specified time.
| |
| getRule | back to summary |
|---|---|
| public DateTimeRule getRule() Gets the start date/time rule associated used by this rule.
| |
| getStartInYear | back to summary |
|---|---|
| public Date getStartInYear(int year, int prevRawOffset, int prevDSTSavings) Gets the time when this rule takes effect in the given year.
| |
| getStartYear | back to summary |
|---|---|
| public int getStartYear() Gets the first year when this rule takes effect.
| |
| isEquivalentTo | back to summary |
|---|---|
| public boolean isEquivalentTo(TimeZoneRule other) Overrides com. Doc from com. Returns if this rule represents the same rule and offsets as another.
When two
| |
| isTransitionRule | back to summary |
|---|---|
| public boolean isTransitionRule() Implements abstract com. Doc from com. Returns if this | |
| toString | back to summary |
|---|---|
| public String toString() Overrides com. Returns a
| |