|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.icu.util.TimeZoneRule
public abstract class TimeZoneRule
TimeZoneRule
is an abstract class representing a rule for time zone.
TimeZoneRule
has a set of time zone attributes, such as zone name,
raw offset (UTC offset for standard time) and daylight saving time offset.
TimeZoneTransition
,
RuleBasedTimeZone
,
Serialized FormConstructor Summary | |
---|---|
TimeZoneRule(String name,
int rawOffset,
int dstSavings)
Constructs a TimeZoneRule with the name, the GMT offset of its
standard time and the amount of daylight saving offset adjustment. |
Method Summary | |
---|---|
int |
getDSTSavings()
Gets the amount of daylight saving delta time from the standard time. |
abstract Date |
getFinalStart(int prevRawOffset,
int prevDSTSavings)
Gets the final time when this rule takes effect. |
abstract Date |
getFirstStart(int prevRawOffset,
int prevDSTSavings)
Gets the very first time when this rule takes effect. |
String |
getName()
Gets the name of this time zone. |
abstract Date |
getNextStart(long base,
int prevRawOffset,
int prevDSTSavings,
boolean inclusive)
Gets the first time when this rule takes effect after the specified time. |
abstract Date |
getPreviousStart(long base,
int prevRawOffset,
int prevDSTSavings,
boolean inclusive)
Gets the most recent time when this rule takes effect before the specified time. |
int |
getRawOffset()
Gets the standard time offset. |
boolean |
isEquivalentTo(TimeZoneRule other)
Returns if this rule represents the same rule and offsets as another. |
abstract boolean |
isTransitionRule()
Returns if this TimeZoneRule has one or more start times. |
String |
toString()
Returns a String representation of this TimeZoneRule object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TimeZoneRule(String name, int rawOffset, int dstSavings)
TimeZoneRule
with the name, the GMT offset of its
standard time and the amount of daylight saving offset adjustment.
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 is a rule for standard time, the value of this argument is 0.Method Detail |
---|
public String getName()
public int getRawOffset()
public int getDSTSavings()
public boolean isEquivalentTo(TimeZoneRule other)
TimeZoneRule
objects differ only its names, this method returns
true.
other
- The TimeZoneRule
object to be compared with.
TimeZoneRule
is the same as this one.public abstract Date getFirstStart(int prevRawOffset, int prevDSTSavings)
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.
public abstract Date getFinalStart(int prevRawOffset, int prevDSTSavings)
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.
public abstract Date getNextStart(long base, int prevRawOffset, int prevDSTSavings, boolean inclusive)
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.
public abstract Date getPreviousStart(long base, int prevRawOffset, int prevDSTSavings, boolean inclusive)
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.
public abstract boolean isTransitionRule()
TimeZoneRule
has one or more start times.
public String toString()
String
representation of this TimeZoneRule
object.
This method is used for debugging purpose only. The string representation can be changed
in future version of ICU without any notice.
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |