From 3ae6fc458a0e747691cf7c0c6c59eb73c34ee33b Mon Sep 17 00:00:00 2001 From: Alan Liu Date: Thu, 9 Oct 2003 23:39:53 +0000 Subject: [PATCH] ICU-2966 revise javadoc X-SVN-Rev: 13383 --- icu4j/src/com/ibm/icu/util/TimeZone.java | 37 ++++++++++++++---------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/icu4j/src/com/ibm/icu/util/TimeZone.java b/icu4j/src/com/ibm/icu/util/TimeZone.java index abf5118f616..e8a77644e0f 100755 --- a/icu4j/src/com/ibm/icu/util/TimeZone.java +++ b/icu4j/src/com/ibm/icu/util/TimeZone.java @@ -176,12 +176,13 @@ abstract public class TimeZone implements Serializable, Cloneable { * Unlike the built-in division, this is mathematically well-behaved. * E.g., -1/4 => 0 * but floorDivide(-1,4) => -1. + * TODO: This duplicates a method in Calendar; clean up and + * consolidate in ICU 3.0. * @param numerator the numerator * @param denominator a divisor which must be > 0 * @return the floor of the quotient. - * @stable ICU 2.0 */ - static final long floorDivide(long numerator, long denominator) { + static long floorDivide(long numerator, long denominator) { // We do this computation in order to handle // a numerator of Long.MIN_VALUE correctly return (numerator >= 0) ? @@ -196,15 +197,16 @@ abstract public class TimeZone implements Serializable, Cloneable { * Unlike the built-in division, this is mathematically well-behaved. * E.g., -1/4 => 0 and -1%4 => -1, * but floorDivide(-1,4) => -1 with remainder[0] => 3. + * TODO: This duplicates a method in Calendar; clean up and + * consolidate in ICU 3.0. * @param numerator the numerator * @param denominator a divisor which must be > 0 * @param remainder an array of at least one element in which the value * numerator mod denominator is returned. Unlike numerator * % denominator, this will always be non-negative. * @return the floor of the quotient. - * @stable ICU 2.0 */ - static final int floorDivide(long numerator, int denominator, int[] remainder) { + static int floorDivide(long numerator, int denominator, int[] remainder) { if (numerator >= 0) { remainder[0] = (int)(numerator % denominator); return (int)(numerator / denominator); @@ -215,10 +217,12 @@ abstract public class TimeZone implements Serializable, Cloneable { } /** - * Compute the Gregorian calendar year, month, and day of month from the - * epoch day. + * Compute the Gregorian calendar year, month, and day of month + * from the epoch day, and return them in the given array. + * TODO: This duplicates a method in Calendar; clean up and + * consolidate in ICU 3.0. */ - final void computeGregorianFields(long day, int fields[]) { + static void computeGregorianFields(long day, int fields[]) { int year, month, dayOfMonth, dayOfYear; // Convert from 1970 CE epoch to 1 CE epoch (Gregorian calendar) @@ -267,15 +271,18 @@ abstract public class TimeZone implements Serializable, Cloneable { } /** - * The number of milliseconds in one day. Although ONE_DAY and - * ONE_WEEK can fit into ints, they must be longs in order to prevent - * arithmetic overflow when performing (bug 4173516). - * @stable ICU 2.0 + * The number of milliseconds in one day. */ - protected static final int MILLIS_PER_DAY = 24*60*60*1000; + static final int MILLIS_PER_DAY = 24*60*60*1000; - private static final int[][] GREGORIAN_MONTH_COUNT = { - // st st2 + /** + * For each month, the days in a non-leap year before the start + * the of month, and the days in a leap year before the start of + * the month. + * TODO: This duplicates data in Calendar.java; clean up and + * consolidate in ICU 3.0. + */ + static final int[][] GREGORIAN_MONTH_COUNT = { { 0, 0 }, // Jan { 31, 31 }, // Feb { 59, 60 }, // Mar @@ -288,8 +295,6 @@ abstract public class TimeZone implements Serializable, Cloneable { { 273, 274 }, // Oct { 304, 305 }, // Nov { 334, 335 } // Dec - // st days in year before start of month - // st2 days in year before month in leap year }; /**