]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - jars/icu4j-52_1/main/classes/core/src/com/ibm/icu/util/BasicTimeZone.java
Upgrade ICU4J.
[Dictionary.git] / jars / icu4j-52_1 / main / classes / core / src / com / ibm / icu / util / BasicTimeZone.java
similarity index 97%
rename from jars/icu4j-4_8_1_1/main/classes/core/src/com/ibm/icu/util/BasicTimeZone.java
rename to jars/icu4j-52_1/main/classes/core/src/com/ibm/icu/util/BasicTimeZone.java
index ec565e3cdf3f52c9cefbd60f1c53d2d40c46c4b5..4062f94f20046728c013171fb1996a541770d31d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *******************************************************************************
- * Copyright (C) 2007-2010, International Business Machines Corporation and    *
+ * Copyright (C) 2007-2011, International Business Machines Corporation and    *
  * others. All Rights Reserved.                                                *
  *******************************************************************************
  */
@@ -33,7 +33,8 @@ public abstract class BasicTimeZone extends TimeZone {
 
     /**
      * {@icu} Returns the first time zone transition after the base time.
-     *
+     * <p>Example code:{@.jcite com.ibm.icu.samples.util.timezone.BasicTimeZoneExample:---getNextTransitionExample}
+     * 
      * @param base      The base time.
      * @param inclusive Whether the base time is inclusive or not.
      *
@@ -47,6 +48,7 @@ public abstract class BasicTimeZone extends TimeZone {
 
     /**
      * {@icu} Returns the last time zone transition before the base time.
+     * <p>Example code:{@.jcite com.ibm.icu.samples.util.timezone.BasicTimeZoneExample:---getPreviousTransitionExample}
      *
      * @param base      The base time.
      * @param inclusive Whether the base time is inclusive or not.
@@ -64,6 +66,7 @@ public abstract class BasicTimeZone extends TimeZone {
      * This method returns true when all of transition times, from/to standard
      * offsets and DST savings used by this time zone match the other in the
      * time range.
+     * <p>Example code:{@.jcite com.ibm.icu.samples.util.timezone.BasicTimeZoneExample:---hasEquivalentTransitionsExample}
      *
      * @param tz    The instance of <code>TimeZone</code>
      * @param start The start time of the evaluated time range (inclusive)
@@ -102,9 +105,10 @@ public abstract class BasicTimeZone extends TimeZone {
      */
     public boolean hasEquivalentTransitions(TimeZone tz, long start, long end, 
                                             boolean ignoreDstAmount) {
-        if (hasSameRules(tz)) {
+        if (this == tz) {
             return true;
         }
+
         if (!(tz instanceof BasicTimeZone)) {
             return false;
         }
@@ -221,6 +225,7 @@ public abstract class BasicTimeZone extends TimeZone {
      * instance for the initial rule.  The rest will be either
      * <code>AnnualTimeZoneRule</code> or <code>TimeArrayTimeZoneRule</code>
      * instances representing transitions.
+     * <p>Example code:{@.jcite com.ibm.icu.samples.util.timezone.BasicTimeZoneExample:---getTimeZoneRulesExample}
      *
      * @param start The start time (inclusive).
      * @return  The array of <code>TimeZoneRule</code> which represents this
@@ -592,4 +597,14 @@ public abstract class BasicTimeZone extends TimeZone {
      */
     protected BasicTimeZone() {
     }
+
+    /**
+     * Constructing a BasicTimeZone with the given time zone ID.
+     * @param ID the time zone ID.
+     * @internal
+     * @deprecated This API is ICU internal only.
+     */
+    protected BasicTimeZone(String ID) {
+        super(ID);
+    }
 }