Package com.ibm.icu.impl
Class TimeZoneAdapter
java.lang.Object
java.util.TimeZone
com.ibm.icu.impl.TimeZoneAdapter
- All Implemented Interfaces:
Serializable
,Cloneable
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.- Since:
- ICU 2.8
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final long
private TimeZone
The contained com.ibm.icu.util.TimeZone object. -
Constructor Summary
ConstructorsConstructorDescriptionTimeZoneAdapter
(TimeZone zone) Constructs an adapter for a com.ibm.icu.util.TimeZone object. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Boilerplate API; calls through to wrapped object.boolean
Boilerplate API; calls through to wrapped object.int
getOffset
(int era, int year, int month, int day, int dayOfWeek, int millis) TimeZone API; calls through to wrapped time zone.int
TimeZone API; calls through to wrapped time zone.int
hashCode()
Boilerplate API; calls through to wrapped object.boolean
hasSameRules
(TimeZone other) TimeZone API; calls through to wrapped time zone.boolean
inDaylightTime
(Date date) TimeZone API; calls through to wrapped time zone.void
TimeZone API; calls through to wrapped time zone.void
setRawOffset
(int offsetMillis) TimeZone API; calls through to wrapped time zone.toString()
Returns a string representation of this object.unwrap()
Return the java.util.TimeZone wrapped by this object.boolean
TimeZone API; calls through to wrapped time zone.static TimeZone
Given a java.util.TimeZone, wrap it in the appropriate adapter subclass of com.ibm.icu.util.TimeZone and return the adapter.Methods inherited from class java.util.TimeZone
getAvailableIDs, getAvailableIDs, getDefault, getDisplayName, getDisplayName, getDisplayName, getDisplayName, getDSTSavings, getID, getOffset, getTimeZone, getTimeZone, observesDaylightTime, setDefault, toZoneId
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
zone
The contained com.ibm.icu.util.TimeZone object. Must not be null. We delegate all methods to this object.
-
-
Constructor Details
-
TimeZoneAdapter
Constructs an adapter for a com.ibm.icu.util.TimeZone object.
-
-
Method Details
-
wrap
Given a java.util.TimeZone, wrap it in the appropriate adapter subclass of com.ibm.icu.util.TimeZone and return the adapter. -
unwrap
Return the java.util.TimeZone wrapped by this object. -
setID
TimeZone API; calls through to wrapped time zone. -
hasSameRules
TimeZone API; calls through to wrapped time zone.- Overrides:
hasSameRules
in classTimeZone
-
getOffset
public int getOffset(int era, int year, int month, int day, int dayOfWeek, int millis) TimeZone API; calls through to wrapped time zone. -
getRawOffset
public int getRawOffset()TimeZone API; calls through to wrapped time zone.- Specified by:
getRawOffset
in classTimeZone
-
setRawOffset
public void setRawOffset(int offsetMillis) TimeZone API; calls through to wrapped time zone.- Specified by:
setRawOffset
in classTimeZone
-
useDaylightTime
public boolean useDaylightTime()TimeZone API; calls through to wrapped time zone.- Specified by:
useDaylightTime
in classTimeZone
-
inDaylightTime
TimeZone API; calls through to wrapped time zone.- Specified by:
inDaylightTime
in classTimeZone
-
clone
Boilerplate API; calls through to wrapped object. -
hashCode
public int hashCode()Boilerplate API; calls through to wrapped object. -
equals
Boilerplate API; calls through to wrapped object. -
toString
Returns a string representation of this object.
-