Class TimeZoneICU

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class TimeZoneICU
    extends java.util.TimeZone
    TimeZoneICU is an adapter class which wraps ICU4J TimeZone and implements java.util.TimeZone APIs.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private TimeZone fIcuTz  
      private static long serialVersionUID  
      • Fields inherited from class java.util.TimeZone

        LONG, SHORT
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private TimeZoneICU​(TimeZone icuTz)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()  
      java.lang.String getDisplayName​(boolean daylight, int style, java.util.Locale locale)  
      int getDSTSavings()  
      java.lang.String getID()  
      int getOffset​(int era, int year, int month, int day, int dayOfWeek, int milliseconds)  
      int getOffset​(long date)  
      int getRawOffset()  
      boolean hasSameRules​(java.util.TimeZone other)  
      boolean inDaylightTime​(java.util.Date date)  
      void setID​(java.lang.String ID)  
      void setRawOffset​(int offsetMillis)  
      TimeZone unwrap()  
      boolean useDaylightTime()  
      static java.util.TimeZone wrap​(TimeZone icuTz)  
      • Methods inherited from class java.util.TimeZone

        getAvailableIDs, getAvailableIDs, getDefault, getDisplayName, getDisplayName, getDisplayName, getTimeZone, getTimeZone, observesDaylightTime, setDefault, toZoneId
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TimeZoneICU

        private TimeZoneICU​(TimeZone icuTz)
    • Method Detail

      • wrap

        public static java.util.TimeZone wrap​(TimeZone icuTz)
      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.util.TimeZone
      • getDisplayName

        public java.lang.String getDisplayName​(boolean daylight,
                                               int style,
                                               java.util.Locale locale)
        Overrides:
        getDisplayName in class java.util.TimeZone
      • getDSTSavings

        public int getDSTSavings()
        Overrides:
        getDSTSavings in class java.util.TimeZone
      • getID

        public java.lang.String getID()
        Overrides:
        getID in class java.util.TimeZone
      • getOffset

        public int getOffset​(int era,
                             int year,
                             int month,
                             int day,
                             int dayOfWeek,
                             int milliseconds)
        Specified by:
        getOffset in class java.util.TimeZone
      • getOffset

        public int getOffset​(long date)
        Overrides:
        getOffset in class java.util.TimeZone
      • getRawOffset

        public int getRawOffset()
        Specified by:
        getRawOffset in class java.util.TimeZone
      • hasSameRules

        public boolean hasSameRules​(java.util.TimeZone other)
        Overrides:
        hasSameRules in class java.util.TimeZone
      • inDaylightTime

        public boolean inDaylightTime​(java.util.Date date)
        Specified by:
        inDaylightTime in class java.util.TimeZone
      • setID

        public void setID​(java.lang.String ID)
        Overrides:
        setID in class java.util.TimeZone
      • setRawOffset

        public void setRawOffset​(int offsetMillis)
        Specified by:
        setRawOffset in class java.util.TimeZone
      • useDaylightTime

        public boolean useDaylightTime()
        Specified by:
        useDaylightTime in class java.util.TimeZone