TimeZoneAdapter wraps a com.ibm.icu.util.TimeZone
subclass and inherits from java.util.TimeZone.
Without this class, we would need to 'port' java.util.Date to
com.ibm.icu.util as well, so that Date could interoperate properly
with the com.ibm.icu.util TimeZone and Calendar classes. With this
class, we can use java.util.Date together with com.ibm.icu.util
classes.
com.ibm.icu.util.TimeZone#setDefault
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final long | |
| private TimeZone | zone
The contained com.ibm.icu.util.TimeZone object. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public int | getOffset(int
the era of the given date. era, int the year in the given date. year, int the month in the given date.
Month is 0-based. e.g., 0 for January. month, int the day-in-month of the given date. day, int the day-of-week of the given date. dayOfWeek, int the milliseconds in day in standard
local time. millis)Implements abstract java. |
| public int | getRawOffset()
Implements abstract java. |
| public synchronized int | |
| public boolean | hasSameRules(TimeZone
the other)TimeZone object to be compared withOverrides java. |
| public boolean | inDaylightTime(Date
the given Date. date)Implements abstract java. |
| public void | setID(String
the new time zone ID. ID)Overrides java. |
| public void | setRawOffset(int
the given base time zone offset to GMT. offsetMillis)Implements abstract java. |
| public String | Returns: a string representation of this object.Overrides java. |
| public TimeZone | |
| public boolean | useDaylightTime()
Implements abstract java. |
| public static TimeZone |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID | |
| zone | back to summary |
|---|---|
| private TimeZone zone The contained com.ibm.icu.util.TimeZone object. Must not be null. We delegate all methods to this object. | |
| TimeZoneAdapter | back to summary |
|---|---|
| public TimeZoneAdapter(TimeZone zone) Constructs an adapter for a com.ibm.icu.util.TimeZone object. | |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Boilerplate API; calls through to wrapped object.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Boilerplate API; calls through to wrapped object.
| |
| getOffset | back to summary |
|---|---|
| public int getOffset(int era, int year, int month, int day, int dayOfWeek, int millis) Implements abstract java. TimeZone API; calls through to wrapped time zone.
| |
| getRawOffset | back to summary |
|---|---|
| public int getRawOffset() Implements abstract java. TimeZone API; calls through to wrapped time zone.
| |
| hashCode | back to summary |
|---|---|
| public synchronized int hashCode() Overrides java. Boilerplate API; calls through to wrapped object.
| |
| hasSameRules | back to summary |
|---|---|
| public boolean hasSameRules(TimeZone other) Overrides java. TimeZone API; calls through to wrapped time zone.
| |
| inDaylightTime | back to summary |
|---|---|
| public boolean inDaylightTime(Date date) Implements abstract java. TimeZone API; calls through to wrapped time zone.
| |
| setID | back to summary |
|---|---|
| public void setID(String ID) Overrides java. TimeZone API; calls through to wrapped time zone.
| |
| setRawOffset | back to summary |
|---|---|
| public void setRawOffset(int offsetMillis) Implements abstract java. TimeZone API; calls through to wrapped time zone.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of this object. | |
| unwrap | back to summary |
|---|---|
| public TimeZone unwrap() Return the java.util.TimeZone wrapped by this object. | |
| useDaylightTime | back to summary |
|---|---|
| public boolean useDaylightTime() Implements abstract java. TimeZone API; calls through to wrapped time zone.
| |
| wrap | back to summary |
|---|---|
| public static TimeZone wrap(TimeZone tz) Given a java.util.TimeZone, wrap it in the appropriate adapter subclass of com.ibm.icu.util.TimeZone and return the adapter. | |