]> granicus.if.org Git - icu/commitdiff
ICU-22125 Add note about future deprecation to MeasureUnit createMetricTon/getMetricT...
authorPeter Edberg <pedberg@unicode.org>
Fri, 9 Sep 2022 00:07:54 +0000 (17:07 -0700)
committerPeter Edberg <42151464+pedberg-icu@users.noreply.github.com>
Fri, 9 Sep 2022 03:59:07 +0000 (20:59 -0700)
icu4c/source/i18n/unicode/measunit.h
icu4j/main/classes/core/src/com/ibm/icu/util/MeasureUnit.java

index 21e9bb7f1549cdc7c30cf4693f650104e54ed540..6a64ae2bb3e44e5e176f3e2b7a72069fa572b448 100644 (file)
@@ -2585,19 +2585,25 @@ class U_I18N_API MeasureUnit: public UObject {
     static MeasureUnit getKilogram();
 
     /**
-     * Returns by pointer, unit of mass: metric-ton.
-     * (renamed to tonne in CLDR 42 / ICU 72)
+     * Returns by pointer, unit of mass: metric-ton
+     * (renamed to tonne in CLDR 42 / ICU 72).
      * Caller owns returned value and must free it.
-     * Also see {@link #getMetricTon()}.
+     * Note: In ICU 74 this will be deprecated in favor of
+     * createTonne(), which is currently draft but will
+     * become stable in ICU 74, and which uses the preferred naming.
+     * Also see {@link #getMetricTon()} and {@link #createTonne()}.
      * @param status ICU error code.
      * @stable ICU 54
      */
     static MeasureUnit *createMetricTon(UErrorCode &status);
 
     /**
-     * Returns by value, unit of mass: metric-ton.
-      * (renamed to tonne in CLDR 42 / ICU 72)
-    * Also see {@link #createMetricTon()}.
+     * Returns by value, unit of mass: metric-ton
+     * (renamed to tonne in CLDR 42 / ICU 72).
+     * Note: In ICU 74 this will be deprecated in favor of
+     * getTonne(), which is currently draft but will
+     * become stable in ICU 74, and which uses the preferred naming.
+     * Also see {@link #createMetricTon()} and {@link #getTonne()}.
      * @stable ICU 64
      */
     static MeasureUnit getMetricTon();
index d96589e582078b90a23aaa65f4f762fceea78d1e..3ee12c4eeccfcfa03c014f05fd3831401aa059c9 100644 (file)
@@ -1606,7 +1606,9 @@ public class MeasureUnit implements Serializable {
     public static final MeasureUnit KILOGRAM = MeasureUnit.internalGetInstance("mass", "kilogram");
 
     /**
-     * Constant for unit of mass: metric-ton (renamed to tonne in CLDR 42 / ICU 72)
+     * Constant for unit of mass: metric-ton (renamed to tonne in CLDR 42 / ICU 72).
+     * Note: In ICU 74 this will be deprecated in favor of TONNE, which is currently
+     * draft but will become stable in ICU 74, and which uses the preferred naming.
      * @stable ICU 54
      */
     public static final MeasureUnit METRIC_TON = MeasureUnit.internalGetInstance("mass", "tonne");