public class TimeZoneAdapter extends TimeZone
TimeZoneAdapter wraps a org.graalvm.shadowed.com.ibm.icu.util.TimeZone
subclass and inherits from java.util.TimeZone.
Without this class, we would need to 'port' java.util.Date to
org.graalvm.shadowed.com.ibm.icu.util as well, so that Date could interoperate properly
with the org.graalvm.shadowed.com.ibm.icu.util TimeZone and Calendar classes. With this
class, we can use java.util.Date together with org.graalvm.shadowed.com.ibm.icu.util
classes.TimeZone.setDefault(org.graalvm.shadowed.com.ibm.icu.util.TimeZone),
Serialized Form| Constructor and Description |
|---|
TimeZoneAdapter(TimeZone zone)
Constructs an adapter for a org.graalvm.shadowed.com.ibm.icu.util.TimeZone object.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Boilerplate API; calls through to wrapped object.
|
boolean |
equals(Object obj)
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 |
getRawOffset()
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 |
setID(String ID)
TimeZone API; calls through to wrapped time zone.
|
void |
setRawOffset(int offsetMillis)
TimeZone API; calls through to wrapped time zone.
|
String |
toString()
Returns a string representation of this object.
|
TimeZone |
unwrap()
Return the java.util.TimeZone wrapped by this object.
|
boolean |
useDaylightTime()
TimeZone API; calls through to wrapped time zone.
|
static TimeZone |
wrap(TimeZone tz)
Given a java.util.TimeZone, wrap it in the appropriate adapter
subclass of org.graalvm.shadowed.com.ibm.icu.util.TimeZone and return the adapter.
|
getAvailableIDs, getAvailableIDs, getDefault, getDisplayName, getDisplayName, getDisplayName, getDisplayName, getDSTSavings, getID, getOffset, getTimeZone, getTimeZone, observesDaylightTime, setDefault, toZoneIdpublic TimeZoneAdapter(TimeZone zone)
public static TimeZone wrap(TimeZone tz)
public TimeZone unwrap()
public void setID(String ID)
public boolean hasSameRules(TimeZone other)
hasSameRules in class TimeZonepublic int getOffset(int era,
int year,
int month,
int day,
int dayOfWeek,
int millis)
public int getRawOffset()
getRawOffset in class TimeZonepublic void setRawOffset(int offsetMillis)
setRawOffset in class TimeZonepublic boolean useDaylightTime()
useDaylightTime in class TimeZonepublic boolean inDaylightTime(Date date)
inDaylightTime in class TimeZonepublic Object clone()
public int hashCode()
public boolean equals(Object obj)