|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.TimeZone | +--com.ibm.util.SimpleTimeZoneAdapter
SimpleTimeZoneAdapter
wraps a
com.ibm.util.SimpleTimeZone and inherits from java.util.TimeZone.
Without this class, we would need to 'port' java.util.Date to
com.ibm.util as well, so that Date could interoperate properly with
the com.ibm.util TimeZone and Calendar classes. With this class,
we can (mostly) use java.util.Date together with com.ibm.util
classes.
This solution is imperfect because of the faulty design of java.util.TimeZone. Specifically, TZ contains a package private method, getOffset(), that should really be public. Because it is package private, it cannot be overridden from where we are, and we cannot properly delegate its operation to our contained com.ibm.util.STZ object.
For the moment we live with this problem. It appear not to cause too much trouble since most real computations happen using the com.ibm.util classes. However, if this becomes a problem in the future, we will have to stop using this adapter, and 'port' java.util.Date into com.ibm.util.
TimeZone.setDefault(com.ibm.util.TimeZone)
, Serialized FormFields inherited from class java.util.TimeZone |
LONG, SHORT |
Constructor Summary | |
SimpleTimeZoneAdapter(SimpleTimeZone zone)
|
Method Summary | |
java.lang.Object |
clone()
Overrides Cloneable |
boolean |
equals(java.lang.Object obj)
Compares the equality of two SimpleTimeZone objects. |
java.lang.String |
getID()
Override TimeZone |
int |
getOffset(int era,
int year,
int month,
int day,
int dayOfWeek,
int millis)
Override TimeZone |
int |
getRawOffset()
Overrides TimeZone Gets the GMT offset for this time zone. |
int |
hashCode()
Override hashCode. |
boolean |
hasSameRules(java.util.TimeZone other)
Override TimeZone |
boolean |
inDaylightTime(java.util.Date date)
Overrides TimeZone |
void |
setID(java.lang.String ID)
Override TimeZone |
void |
setRawOffset(int offsetMillis)
Overrides TimeZone |
java.lang.String |
toString()
Return a string representation of this time zone. |
boolean |
useDaylightTime()
Overrides TimeZone |
Methods inherited from class java.util.TimeZone |
getAvailableIDs, getAvailableIDs, getDefault, getDisplayName, getDisplayName, getDisplayName, getDisplayName, getTimeZone, setDefault |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SimpleTimeZoneAdapter(SimpleTimeZone zone)
Method Detail |
public java.lang.String getID()
getID
in class java.util.TimeZone
public void setID(java.lang.String ID)
setID
in class java.util.TimeZone
public boolean hasSameRules(java.util.TimeZone other)
hasSameRules
in class java.util.TimeZone
public int getOffset(int era, int year, int month, int day, int dayOfWeek, int millis)
getOffset
in class java.util.TimeZone
public int getRawOffset()
getRawOffset
in class java.util.TimeZone
public void setRawOffset(int offsetMillis)
setRawOffset
in class java.util.TimeZone
public boolean useDaylightTime()
useDaylightTime
in class java.util.TimeZone
public boolean inDaylightTime(java.util.Date date)
inDaylightTime
in class java.util.TimeZone
public java.lang.Object clone()
clone
in class java.util.TimeZone
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The SimpleTimeZone object to be compared with.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |