Class InitialTimeZoneRule
java.lang.Object
org.graalvm.shadowed.com.ibm.icu.util.TimeZoneRule
org.graalvm.shadowed.com.ibm.icu.util.InitialTimeZoneRule
- All Implemented Interfaces:
Serializable
InitialTimeZoneRule represents a time zone rule
representing a time zone effective from the beginning and
has no actual start times.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInitialTimeZoneRule(String name, int rawOffset, int dstSavings) Constructs aInitialTimeZoneRulewith the name, the GMT offset of its standard time and the amount of daylight saving offset adjustment. -
Method Summary
Modifier and TypeMethodDescriptiongetFinalStart(int prevRawOffset, int prevDSTSavings) Gets the final time when this rule takes effect.getFirstStart(int prevRawOffset, int prevDSTSavings) Gets the very first time when this rule takes effect.getNextStart(long base, int prevRawOffset, int prevDSTSavings, boolean inclusive) Gets the first time when this rule takes effect after the specified time.getPreviousStart(long base, int prevRawOffset, int prevDSTSavings, boolean inclusive) Gets the most recent time when this rule takes effect before the specified time.booleanisEquivalentTo(TimeZoneRule other) Returns if this rule represents the same rule and offsets as another.booleanReturns if thisTimeZoneRulehas one or more start times.Methods inherited from class org.graalvm.shadowed.com.ibm.icu.util.TimeZoneRule
getDSTSavings, getName, getRawOffset, toString
-
Constructor Details
-
InitialTimeZoneRule
Constructs aInitialTimeZoneRulewith the name, the GMT offset of its standard time and the amount of daylight saving offset adjustment.- Parameters:
name- The time zone name.rawOffset- The UTC offset of its standard time in milliseconds.dstSavings- The amount of daylight saving offset adjustment in milliseconds. If this ia a rule for standard time, the value of this argument is 0.
-
-
Method Details
-
isEquivalentTo
Returns if this rule represents the same rule and offsets as another. When twoTimeZoneRuleobjects differ only its names, this method returns true.- Overrides:
isEquivalentToin classTimeZoneRule- Parameters:
other- TheTimeZoneRuleobject to be compared with.- Returns:
- true if the other
TimeZoneRuleis the same as this one.
-
getFinalStart
Gets the final time when this rule takes effect.
Note: This method inInitialTimeZoneRulealways returns null.- Specified by:
getFinalStartin classTimeZoneRule- Parameters:
prevRawOffset- The standard time offset from UTC before this rule takes effect in milliseconds.prevDSTSavings- The amount of daylight saving offset from the standard time.- Returns:
- The very last time when this rule takes effect, or null if this rule is applied for future dates infinitely.
-
getFirstStart
Gets the very first time when this rule takes effect.
Note: This method inInitialTimeZoneRulealways returns null.- Specified by:
getFirstStartin classTimeZoneRule- Parameters:
prevRawOffset- The standard time offset from UTC before this rule takes effect in milliseconds.prevDSTSavings- The amount of daylight saving offset from the standard time.- Returns:
- The very first time when this rule takes effect.
-
getNextStart
Gets the first time when this rule takes effect after the specified time.
Note: This method inInitialTimeZoneRulealways returns null.- Specified by:
getNextStartin classTimeZoneRule- Parameters:
base- The first time after this time is returned.prevRawOffset- The standard time offset from UTC before this rule takes effect in milliseconds.prevDSTSavings- The amount of daylight saving offset from the standard time.inclusive- Whether the base time is inclusive or not.- Returns:
- The first time when this rule takes effect after the specified time, or null when this rule never takes effect after the specified time.
-
getPreviousStart
Gets the most recent time when this rule takes effect before the specified time.
Note: This method inInitialTimeZoneRulealways returns null.- Specified by:
getPreviousStartin classTimeZoneRule- Parameters:
base- The most recent time when this rule takes effect before this time is returned.prevRawOffset- The standard time offset from UTC before this rule takes effect in milliseconds.prevDSTSavings- The amount of daylight saving offset from the standard time.inclusive- Whether the base time is inclusive or not.- Returns:
- The most recent time when this rule takes effect before the specified time, or null when this rule never takes effect before the specified time.
-
isTransitionRule
public boolean isTransitionRule()Returns if thisTimeZoneRulehas one or more start times.
Note: This method inInitialTimeZoneRulealways returns false.- Specified by:
isTransitionRulein classTimeZoneRule- Returns:
- true if this
TimeZoneRulehas one or more start times.
-