Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-04 08:53:35

0001 // © 2016 and later: Unicode, Inc. and others.
0002 // License & terms of use: http://www.unicode.org/copyright.html
0003 /*
0004 **********************************************************************
0005 * Copyright (c) 2004-2016, International Business Machines
0006 * Corporation and others.  All Rights Reserved.
0007 **********************************************************************
0008 * Author: Alan Liu
0009 * Created: April 26, 2004
0010 * Since: ICU 3.0
0011 **********************************************************************
0012 */
0013 #ifndef __MEASUREUNIT_H__
0014 #define __MEASUREUNIT_H__
0015 
0016 #include "unicode/utypes.h"
0017 
0018 #if U_SHOW_CPLUSPLUS_API
0019 
0020 #if !UCONFIG_NO_FORMATTING
0021 
0022 #include <utility>
0023 #include "unicode/unistr.h"
0024 #include "unicode/localpointer.h"
0025 
0026 /**
0027  * \file
0028  * \brief C++ API: A unit for measuring a quantity.
0029  */
0030 
0031 U_NAMESPACE_BEGIN
0032 
0033 class StringEnumeration;
0034 class MeasureUnitImpl;
0035 
0036 namespace number::impl {
0037 class LongNameHandler;
0038 } // namespace number::impl
0039 
0040 /**
0041  * Enumeration for unit complexity. There are three levels:
0042  *
0043  * - SINGLE: A single unit, optionally with a power and/or SI or binary prefix.
0044  *           Examples: hectare, square-kilometer, kilojoule, per-second, mebibyte.
0045  * - COMPOUND: A unit composed of the product of multiple single units. Examples:
0046  *             meter-per-second, kilowatt-hour, kilogram-meter-per-square-second.
0047  * - MIXED: A unit composed of the sum of multiple single units. Examples: foot+inch,
0048  *          hour+minute+second, degree+arcminute+arcsecond.
0049  *
0050  * The complexity determines which operations are available. For example, you cannot set the power
0051  * or prefix of a compound unit.
0052  *
0053  * @stable ICU 67
0054  */
0055 enum UMeasureUnitComplexity {
0056     /**
0057      * A single unit, like kilojoule.
0058      *
0059      * @stable ICU 67
0060      */
0061     UMEASURE_UNIT_SINGLE,
0062 
0063     /**
0064      * A compound unit, like meter-per-second.
0065      *
0066      * @stable ICU 67
0067      */
0068     UMEASURE_UNIT_COMPOUND,
0069 
0070     /**
0071      * A mixed unit, like hour+minute.
0072      *
0073      * @stable ICU 67
0074      */
0075     UMEASURE_UNIT_MIXED
0076 };
0077 
0078 
0079 /**
0080  * Enumeration for SI and binary prefixes, e.g. "kilo-", "nano-", "mebi-".
0081  *
0082  * Enum values should be treated as opaque: use umeas_getPrefixPower() and
0083  * umeas_getPrefixBase() to find their corresponding values.
0084  *
0085  * @stable ICU 69
0086  * @see umeas_getPrefixBase
0087  * @see umeas_getPrefixPower
0088  */
0089 typedef enum UMeasurePrefix {
0090     /**
0091      * The absence of an SI or binary prefix.
0092      *
0093      * The integer representation of this enum value is an arbitrary
0094      * implementation detail and should not be relied upon: use
0095      * umeas_getPrefixPower() to obtain meaningful values.
0096      *
0097      * @stable ICU 69
0098      */
0099     UMEASURE_PREFIX_ONE = 30 + 0,
0100 
0101     /**
0102      * SI prefix: yotta, 10^24.
0103      *
0104      * @stable ICU 69
0105      */
0106     UMEASURE_PREFIX_YOTTA = UMEASURE_PREFIX_ONE + 24,
0107 
0108 #ifndef U_HIDE_DRAFT_API
0109     /**
0110      * SI prefix: ronna, 10^27.
0111      *
0112      * @draft ICU 75
0113      */
0114     UMEASURE_PREFIX_RONNA = UMEASURE_PREFIX_ONE + 27,
0115 
0116     /**
0117      * SI prefix: quetta, 10^30.
0118      *
0119      * @draft ICU 75
0120      */
0121     UMEASURE_PREFIX_QUETTA = UMEASURE_PREFIX_ONE + 30,
0122 #endif  /* U_HIDE_DRAFT_API */
0123 
0124 #ifndef U_HIDE_INTERNAL_API
0125     /**
0126      * ICU use only.
0127      * Used to determine the set of base-10 SI prefixes.
0128      * @internal
0129      */
0130 #ifndef U_HIDE_DRAFT_API
0131     UMEASURE_PREFIX_INTERNAL_MAX_SI = UMEASURE_PREFIX_QUETTA,
0132 #else  /* U_HIDE_DRAFT_API */
0133     UMEASURE_PREFIX_INTERNAL_MAX_SI = UMEASURE_PREFIX_YOTTA,
0134 #endif  /* U_HIDE_DRAFT_API */
0135 
0136 #endif  /* U_HIDE_INTERNAL_API */
0137 
0138     /**
0139      * SI prefix: zetta, 10^21.
0140      *
0141      * @stable ICU 69
0142      */
0143     UMEASURE_PREFIX_ZETTA = UMEASURE_PREFIX_ONE + 21,
0144 
0145     /**
0146      * SI prefix: exa, 10^18.
0147      *
0148      * @stable ICU 69
0149      */
0150     UMEASURE_PREFIX_EXA = UMEASURE_PREFIX_ONE + 18,
0151 
0152     /**
0153      * SI prefix: peta, 10^15.
0154      *
0155      * @stable ICU 69
0156      */
0157     UMEASURE_PREFIX_PETA = UMEASURE_PREFIX_ONE + 15,
0158 
0159     /**
0160      * SI prefix: tera, 10^12.
0161      *
0162      * @stable ICU 69
0163      */
0164     UMEASURE_PREFIX_TERA = UMEASURE_PREFIX_ONE + 12,
0165 
0166     /**
0167      * SI prefix: giga, 10^9.
0168      *
0169      * @stable ICU 69
0170      */
0171     UMEASURE_PREFIX_GIGA = UMEASURE_PREFIX_ONE + 9,
0172 
0173     /**
0174      * SI prefix: mega, 10^6.
0175      *
0176      * @stable ICU 69
0177      */
0178     UMEASURE_PREFIX_MEGA = UMEASURE_PREFIX_ONE + 6,
0179 
0180     /**
0181      * SI prefix: kilo, 10^3.
0182      *
0183      * @stable ICU 69
0184      */
0185     UMEASURE_PREFIX_KILO = UMEASURE_PREFIX_ONE + 3,
0186 
0187     /**
0188      * SI prefix: hecto, 10^2.
0189      *
0190      * @stable ICU 69
0191      */
0192     UMEASURE_PREFIX_HECTO = UMEASURE_PREFIX_ONE + 2,
0193 
0194     /**
0195      * SI prefix: deka, 10^1.
0196      *
0197      * @stable ICU 69
0198      */
0199     UMEASURE_PREFIX_DEKA = UMEASURE_PREFIX_ONE + 1,
0200 
0201     /**
0202      * SI prefix: deci, 10^-1.
0203      *
0204      * @stable ICU 69
0205      */
0206     UMEASURE_PREFIX_DECI = UMEASURE_PREFIX_ONE + -1,
0207 
0208     /**
0209      * SI prefix: centi, 10^-2.
0210      *
0211      * @stable ICU 69
0212      */
0213     UMEASURE_PREFIX_CENTI = UMEASURE_PREFIX_ONE + -2,
0214 
0215     /**
0216      * SI prefix: milli, 10^-3.
0217      *
0218      * @stable ICU 69
0219      */
0220     UMEASURE_PREFIX_MILLI = UMEASURE_PREFIX_ONE + -3,
0221 
0222     /**
0223      * SI prefix: micro, 10^-6.
0224      *
0225      * @stable ICU 69
0226      */
0227     UMEASURE_PREFIX_MICRO = UMEASURE_PREFIX_ONE + -6,
0228 
0229     /**
0230      * SI prefix: nano, 10^-9.
0231      *
0232      * @stable ICU 69
0233      */
0234     UMEASURE_PREFIX_NANO = UMEASURE_PREFIX_ONE + -9,
0235 
0236     /**
0237      * SI prefix: pico, 10^-12.
0238      *
0239      * @stable ICU 69
0240      */
0241     UMEASURE_PREFIX_PICO = UMEASURE_PREFIX_ONE + -12,
0242 
0243     /**
0244      * SI prefix: femto, 10^-15.
0245      *
0246      * @stable ICU 69
0247      */
0248     UMEASURE_PREFIX_FEMTO = UMEASURE_PREFIX_ONE + -15,
0249 
0250     /**
0251      * SI prefix: atto, 10^-18.
0252      *
0253      * @stable ICU 69
0254      */
0255     UMEASURE_PREFIX_ATTO = UMEASURE_PREFIX_ONE + -18,
0256 
0257     /**
0258      * SI prefix: zepto, 10^-21.
0259      *
0260      * @stable ICU 69
0261      */
0262     UMEASURE_PREFIX_ZEPTO = UMEASURE_PREFIX_ONE + -21,
0263 
0264     /**
0265      * SI prefix: yocto, 10^-24.
0266      *
0267      * @stable ICU 69
0268      */
0269     UMEASURE_PREFIX_YOCTO = UMEASURE_PREFIX_ONE + -24,
0270 
0271 #ifndef U_HIDE_DRAFT_API
0272     /**
0273      * SI prefix: ronto, 10^-27.
0274      *
0275      * @draft ICU 75
0276      */
0277     UMEASURE_PREFIX_RONTO = UMEASURE_PREFIX_ONE + -27,
0278 
0279     /**
0280      * SI prefix: quecto, 10^-30.
0281      *
0282      * @draft ICU 75
0283      */
0284     UMEASURE_PREFIX_QUECTO = UMEASURE_PREFIX_ONE + -30,
0285 #endif  /* U_HIDE_DRAFT_API */
0286 
0287 #ifndef U_HIDE_INTERNAL_API
0288     /**
0289      * ICU use only.
0290      * Used to determine the set of base-10 SI prefixes.
0291      * @internal
0292      */
0293 #ifndef U_HIDE_DRAFT_API
0294     UMEASURE_PREFIX_INTERNAL_MIN_SI = UMEASURE_PREFIX_QUECTO,
0295 #else  /* U_HIDE_DRAFT_API */
0296     UMEASURE_PREFIX_INTERNAL_MIN_SI = UMEASURE_PREFIX_YOCTO,
0297 #endif  /* U_HIDE_DRAFT_API */
0298 
0299 #endif  // U_HIDE_INTERNAL_API
0300 
0301     // Cannot conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
0302     // used in definitions of non-internal enum values
0303     /**
0304      * ICU use only.
0305      * Sets the arbitrary offset of the base-1024 binary prefixes' enum values.
0306      * @internal
0307      */
0308     UMEASURE_PREFIX_INTERNAL_ONE_BIN = -60,
0309 
0310     /**
0311      * Binary prefix: kibi, 1024^1.
0312      *
0313      * @stable ICU 69
0314      */
0315     UMEASURE_PREFIX_KIBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 1,
0316 
0317 #ifndef U_HIDE_INTERNAL_API
0318     /**
0319      * ICU use only.
0320      * Used to determine the set of base-1024 binary prefixes.
0321      * @internal
0322      */
0323     UMEASURE_PREFIX_INTERNAL_MIN_BIN = UMEASURE_PREFIX_KIBI,
0324 #endif  // U_HIDE_INTERNAL_API
0325 
0326     /**
0327      * Binary prefix: mebi, 1024^2.
0328      *
0329      * @stable ICU 69
0330      */
0331     UMEASURE_PREFIX_MEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 2,
0332 
0333     /**
0334      * Binary prefix: gibi, 1024^3.
0335      *
0336      * @stable ICU 69
0337      */
0338     UMEASURE_PREFIX_GIBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 3,
0339 
0340     /**
0341      * Binary prefix: tebi, 1024^4.
0342      *
0343      * @stable ICU 69
0344      */
0345     UMEASURE_PREFIX_TEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 4,
0346 
0347     /**
0348      * Binary prefix: pebi, 1024^5.
0349      *
0350      * @stable ICU 69
0351      */
0352     UMEASURE_PREFIX_PEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 5,
0353 
0354     /**
0355      * Binary prefix: exbi, 1024^6.
0356      *
0357      * @stable ICU 69
0358      */
0359     UMEASURE_PREFIX_EXBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 6,
0360 
0361     /**
0362      * Binary prefix: zebi, 1024^7.
0363      *
0364      * @stable ICU 69
0365      */
0366     UMEASURE_PREFIX_ZEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 7,
0367 
0368     /**
0369      * Binary prefix: yobi, 1024^8.
0370      *
0371      * @stable ICU 69
0372      */
0373     UMEASURE_PREFIX_YOBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 8,
0374 
0375 #ifndef U_HIDE_INTERNAL_API
0376     /**
0377      * ICU use only.
0378      * Used to determine the set of base-1024 binary prefixes.
0379      * @internal
0380      */
0381     UMEASURE_PREFIX_INTERNAL_MAX_BIN = UMEASURE_PREFIX_YOBI,
0382 #endif  // U_HIDE_INTERNAL_API
0383 } UMeasurePrefix;
0384 
0385 /**
0386  * Returns the base of the factor associated with the given unit prefix: the
0387  * base is 10 for SI prefixes (kilo, micro) and 1024 for binary prefixes (kibi,
0388  * mebi).
0389  *
0390  * @stable ICU 69
0391  */
0392 U_CAPI int32_t U_EXPORT2 umeas_getPrefixBase(UMeasurePrefix unitPrefix);
0393 
0394 /**
0395  * Returns the exponent of the factor associated with the given unit prefix, for
0396  * example 3 for kilo, -6 for micro, 1 for kibi, 2 for mebi, 3 for gibi.
0397  *
0398  * @stable ICU 69
0399  */
0400 U_CAPI int32_t U_EXPORT2 umeas_getPrefixPower(UMeasurePrefix unitPrefix);
0401 
0402 /**
0403  * A unit such as length, mass, volume, currency, etc.  A unit is
0404  * coupled with a numeric amount to produce a Measure.
0405  *
0406  * @author Alan Liu
0407  * @stable ICU 3.0
0408  */
0409 class U_I18N_API MeasureUnit: public UObject {
0410  public:
0411 
0412     /**
0413      * Default constructor.
0414      * Populates the instance with the base dimensionless unit, which means that there will be
0415      * no unit on the formatted number.
0416      * @stable ICU 3.0
0417      */
0418     MeasureUnit();
0419 
0420     /**
0421      * Copy constructor.
0422      * @stable ICU 3.0
0423      */
0424     MeasureUnit(const MeasureUnit &other);
0425 
0426     /**
0427      * Move constructor.
0428      * @stable ICU 67
0429      */
0430     MeasureUnit(MeasureUnit &&other) noexcept;
0431 
0432     /**
0433      * Construct a MeasureUnit from a CLDR Core Unit Identifier, defined in UTS
0434      * 35. (Core unit identifiers and mixed unit identifiers are supported, long
0435      * unit identifiers are not.) Validates and canonicalizes the identifier.
0436      *
0437      * <pre>
0438      * MeasureUnit example = MeasureUnit::forIdentifier("furlong-per-nanosecond")
0439      * </pre>
0440      *
0441      * @param identifier The CLDR Unit Identifier.
0442      * @param status Set if the identifier is invalid.
0443      * @stable ICU 67
0444      */
0445     static MeasureUnit forIdentifier(StringPiece identifier, UErrorCode& status);
0446 
0447     /**
0448      * Copy assignment operator.
0449      * @stable ICU 3.0
0450      */
0451     MeasureUnit &operator=(const MeasureUnit &other);
0452 
0453     /**
0454      * Move assignment operator.
0455      * @stable ICU 67
0456      */
0457     MeasureUnit &operator=(MeasureUnit &&other) noexcept;
0458 
0459     /**
0460      * Returns a polymorphic clone of this object.  The result will
0461      * have the same class as returned by getDynamicClassID().
0462      * @stable ICU 3.0
0463      */
0464     virtual MeasureUnit* clone() const;
0465 
0466     /**
0467      * Destructor
0468      * @stable ICU 3.0
0469      */
0470     virtual ~MeasureUnit();
0471 
0472     /**
0473      * Equality operator.  Return true if this object is equal
0474      * to the given object.
0475      * @stable ICU 3.0
0476      */
0477     virtual bool operator==(const UObject& other) const;
0478 
0479     /**
0480      * Inequality operator.  Return true if this object is not equal
0481      * to the given object.
0482      * @stable ICU 53
0483      */
0484     bool operator!=(const UObject& other) const {
0485         return !(*this == other);
0486     }
0487 
0488     /**
0489      * Get the type.
0490      *
0491      * If the unit does not have a type, the empty string is returned.
0492      *
0493      * @stable ICU 53
0494      */
0495     const char *getType() const;
0496 
0497     /**
0498      * Get the sub type.
0499      *
0500      * If the unit does not have a subtype, the empty string is returned.
0501      *
0502      * @stable ICU 53
0503      */
0504     const char *getSubtype() const;
0505 
0506     /**
0507      * Get CLDR Unit Identifier for this MeasureUnit, as defined in UTS 35.
0508      *
0509      * @return The string form of this unit, owned by this MeasureUnit.
0510      * @stable ICU 67
0511      */
0512     const char* getIdentifier() const;
0513 
0514     /**
0515      * Compute the complexity of the unit. See UMeasureUnitComplexity for more information.
0516      *
0517      * @param status Set if an error occurs.
0518      * @return The unit complexity.
0519      * @stable ICU 67
0520      */
0521     UMeasureUnitComplexity getComplexity(UErrorCode& status) const;
0522 
0523     /**
0524      * Creates a MeasureUnit which is this SINGLE unit augmented with the specified prefix.
0525      * For example, UMEASURE_PREFIX_KILO for "kilo", or UMEASURE_PREFIX_KIBI for "kibi".
0526      *
0527      * There is sufficient locale data to format all standard prefixes.
0528      *
0529      * NOTE: Only works on SINGLE units. If this is a COMPOUND or MIXED unit, an error will
0530      * occur. For more information, see UMeasureUnitComplexity.
0531      *
0532      * @param prefix The prefix, from UMeasurePrefix.
0533      * @param status Set if this is not a SINGLE unit or if another error occurs.
0534      * @return A new SINGLE unit.
0535      * @stable ICU 69
0536      */
0537     MeasureUnit withPrefix(UMeasurePrefix prefix, UErrorCode& status) const;
0538 
0539     /**
0540      * Returns the current SI or binary prefix of this SINGLE unit. For example,
0541      * if the unit has the prefix "kilo", then UMEASURE_PREFIX_KILO is
0542      * returned.
0543      *
0544      * NOTE: Only works on SINGLE units. If this is a COMPOUND or MIXED unit, an error will
0545      * occur. For more information, see UMeasureUnitComplexity.
0546      *
0547      * @param status Set if this is not a SINGLE unit or if another error occurs.
0548      * @return The prefix of this SINGLE unit, from UMeasurePrefix.
0549      * @see umeas_getPrefixBase
0550      * @see umeas_getPrefixPower
0551      * @stable ICU 69
0552      */
0553     UMeasurePrefix getPrefix(UErrorCode& status) const;
0554 
0555     /**
0556      * Creates a MeasureUnit which is this SINGLE unit augmented with the specified dimensionality
0557      * (power). For example, if dimensionality is 2, the unit will be squared.
0558      *
0559      * NOTE: Only works on SINGLE units. If this is a COMPOUND or MIXED unit, an error will
0560      * occur. For more information, see UMeasureUnitComplexity.
0561      *
0562      * For the base dimensionless unit, withDimensionality does nothing.
0563      *
0564      * @param dimensionality The dimensionality (power).
0565      * @param status Set if this is not a SINGLE unit or if another error occurs.
0566      * @return A new SINGLE unit.
0567      * @stable ICU 67
0568      */
0569     MeasureUnit withDimensionality(int32_t dimensionality, UErrorCode& status) const;
0570 
0571     /**
0572      * Gets the dimensionality (power) of this MeasureUnit. For example, if the unit is square,
0573      * then 2 is returned.
0574      *
0575      * NOTE: Only works on SINGLE units. If this is a COMPOUND or MIXED unit, an error will
0576      * occur. For more information, see UMeasureUnitComplexity.
0577      *
0578      * For the base dimensionless unit, getDimensionality returns 0.
0579      *
0580      * @param status Set if this is not a SINGLE unit or if another error occurs.
0581      * @return The dimensionality (power) of this simple unit.
0582      * @stable ICU 67
0583      */
0584     int32_t getDimensionality(UErrorCode& status) const;
0585 
0586     /**
0587      * Gets the reciprocal of this MeasureUnit, with the numerator and denominator flipped.
0588      *
0589      * For example, if the receiver is "meter-per-second", the unit "second-per-meter" is returned.
0590      *
0591      * NOTE: Only works on SINGLE and COMPOUND units. If this is a MIXED unit, an error will
0592      * occur. For more information, see UMeasureUnitComplexity.
0593      *
0594      * @param status Set if this is a MIXED unit or if another error occurs.
0595      * @return The reciprocal of the target unit.
0596      * @stable ICU 67
0597      */
0598     MeasureUnit reciprocal(UErrorCode& status) const;
0599 
0600     /**
0601      * Gets the product of this unit with another unit. This is a way to build units from
0602      * constituent parts.
0603      *
0604      * The numerator and denominator are preserved through this operation.
0605      *
0606      * For example, if the receiver is "kilowatt" and the argument is "hour-per-day", then the
0607      * unit "kilowatt-hour-per-day" is returned.
0608      *
0609      * NOTE: Only works on SINGLE and COMPOUND units. If either unit (receiver and argument) is a
0610      * MIXED unit, an error will occur. For more information, see UMeasureUnitComplexity.
0611      *
0612      * @param other The MeasureUnit to multiply with the target.
0613      * @param status Set if this or other is a MIXED unit or if another error occurs.
0614      * @return The product of the target unit with the provided unit.
0615      * @stable ICU 67
0616      */
0617     MeasureUnit product(const MeasureUnit& other, UErrorCode& status) const;
0618 
0619     /**
0620      * Gets the list of SINGLE units contained within a MIXED or COMPOUND unit.
0621      *
0622      * Examples:
0623      * - Given "meter-kilogram-per-second", three units will be returned: "meter",
0624      *   "kilogram", and "per-second".
0625      * - Given "hour+minute+second", three units will be returned: "hour", "minute",
0626      *   and "second".
0627      *
0628      * If this is a SINGLE unit, an array of length 1 will be returned.
0629      *
0630      * @param status Set if an error occurs.
0631      * @return A pair with the list of units as a LocalArray and the number of units in the list.
0632      * @stable ICU 68
0633      */
0634     inline std::pair<LocalArray<MeasureUnit>, int32_t> splitToSingleUnits(UErrorCode& status) const;
0635 
0636     /**
0637      * getAvailable gets all of the available units.
0638      * If there are too many units to fit into destCapacity then the
0639      * error code is set to U_BUFFER_OVERFLOW_ERROR.
0640      *
0641      * @param destArray destination buffer.
0642      * @param destCapacity number of MeasureUnit instances available at dest.
0643      * @param errorCode ICU error code.
0644      * @return number of available units.
0645      * @stable ICU 53
0646      */
0647     static int32_t getAvailable(
0648             MeasureUnit *destArray,
0649             int32_t destCapacity,
0650             UErrorCode &errorCode);
0651 
0652     /**
0653      * getAvailable gets all of the available units for a specific type.
0654      * If there are too many units to fit into destCapacity then the
0655      * error code is set to U_BUFFER_OVERFLOW_ERROR.
0656      *
0657      * @param type the type
0658      * @param destArray destination buffer.
0659      * @param destCapacity number of MeasureUnit instances available at dest.
0660      * @param errorCode ICU error code.
0661      * @return number of available units for type.
0662      * @stable ICU 53
0663      */
0664     static int32_t getAvailable(
0665             const char *type,
0666             MeasureUnit *destArray,
0667             int32_t destCapacity,
0668             UErrorCode &errorCode);
0669 
0670     /**
0671      * getAvailableTypes gets all of the available types. Caller owns the
0672      * returned StringEnumeration and must delete it when finished using it.
0673      *
0674      * @param errorCode ICU error code.
0675      * @return the types.
0676      * @stable ICU 53
0677      */
0678     static StringEnumeration* getAvailableTypes(UErrorCode &errorCode);
0679 
0680     /**
0681      * Return the class ID for this class. This is useful only for comparing to
0682      * a return value from getDynamicClassID(). For example:
0683      * <pre>
0684      * .   Base* polymorphic_pointer = createPolymorphicObject();
0685      * .   if (polymorphic_pointer->getDynamicClassID() ==
0686      * .       Derived::getStaticClassID()) ...
0687      * </pre>
0688      * @return          The class ID for all objects of this class.
0689      * @stable ICU 53
0690      */
0691     static UClassID U_EXPORT2 getStaticClassID();
0692 
0693     /**
0694      * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This
0695      * method is to implement a simple version of RTTI, since not all C++
0696      * compilers support genuine RTTI. Polymorphic operator==() and clone()
0697      * methods call this method.
0698      *
0699      * @return          The class ID for this object. All objects of a
0700      *                  given class have the same class ID.  Objects of
0701      *                  other classes have different class IDs.
0702      * @stable ICU 53
0703      */
0704     virtual UClassID getDynamicClassID() const override;
0705 
0706 #ifndef U_HIDE_INTERNAL_API
0707     /**
0708      * ICU use only.
0709      * Returns associated array index for this measure unit.
0710      * @internal
0711      */
0712     int32_t getOffset() const;
0713 #endif /* U_HIDE_INTERNAL_API */
0714 
0715 // All code between the "Start generated createXXX methods" comment and
0716 // the "End generated createXXX methods" comment is auto generated code
0717 // and must not be edited manually. For instructions on how to correctly
0718 // update this code, refer to:
0719 // docs/processes/release/tasks/updating-measure-unit.md
0720 //
0721 // Start generated createXXX methods
0722 
0723     /**
0724      * Returns by pointer, unit of acceleration: g-force.
0725      * Caller owns returned value and must free it.
0726      * Also see {@link #getGForce()}.
0727      * @param status ICU error code.
0728      * @stable ICU 53
0729      */
0730     static MeasureUnit *createGForce(UErrorCode &status);
0731 
0732     /**
0733      * Returns by value, unit of acceleration: g-force.
0734      * Also see {@link #createGForce()}.
0735      * @stable ICU 64
0736      */
0737     static MeasureUnit getGForce();
0738 
0739     /**
0740      * Returns by pointer, unit of acceleration: meter-per-square-second.
0741      * Caller owns returned value and must free it.
0742      * Also see {@link #getMeterPerSecondSquared()}.
0743      * @param status ICU error code.
0744      * @stable ICU 54
0745      */
0746     static MeasureUnit *createMeterPerSecondSquared(UErrorCode &status);
0747 
0748     /**
0749      * Returns by value, unit of acceleration: meter-per-square-second.
0750      * Also see {@link #createMeterPerSecondSquared()}.
0751      * @stable ICU 64
0752      */
0753     static MeasureUnit getMeterPerSecondSquared();
0754 
0755     /**
0756      * Returns by pointer, unit of angle: arc-minute.
0757      * Caller owns returned value and must free it.
0758      * Also see {@link #getArcMinute()}.
0759      * @param status ICU error code.
0760      * @stable ICU 53
0761      */
0762     static MeasureUnit *createArcMinute(UErrorCode &status);
0763 
0764     /**
0765      * Returns by value, unit of angle: arc-minute.
0766      * Also see {@link #createArcMinute()}.
0767      * @stable ICU 64
0768      */
0769     static MeasureUnit getArcMinute();
0770 
0771     /**
0772      * Returns by pointer, unit of angle: arc-second.
0773      * Caller owns returned value and must free it.
0774      * Also see {@link #getArcSecond()}.
0775      * @param status ICU error code.
0776      * @stable ICU 53
0777      */
0778     static MeasureUnit *createArcSecond(UErrorCode &status);
0779 
0780     /**
0781      * Returns by value, unit of angle: arc-second.
0782      * Also see {@link #createArcSecond()}.
0783      * @stable ICU 64
0784      */
0785     static MeasureUnit getArcSecond();
0786 
0787     /**
0788      * Returns by pointer, unit of angle: degree.
0789      * Caller owns returned value and must free it.
0790      * Also see {@link #getDegree()}.
0791      * @param status ICU error code.
0792      * @stable ICU 53
0793      */
0794     static MeasureUnit *createDegree(UErrorCode &status);
0795 
0796     /**
0797      * Returns by value, unit of angle: degree.
0798      * Also see {@link #createDegree()}.
0799      * @stable ICU 64
0800      */
0801     static MeasureUnit getDegree();
0802 
0803     /**
0804      * Returns by pointer, unit of angle: radian.
0805      * Caller owns returned value and must free it.
0806      * Also see {@link #getRadian()}.
0807      * @param status ICU error code.
0808      * @stable ICU 54
0809      */
0810     static MeasureUnit *createRadian(UErrorCode &status);
0811 
0812     /**
0813      * Returns by value, unit of angle: radian.
0814      * Also see {@link #createRadian()}.
0815      * @stable ICU 64
0816      */
0817     static MeasureUnit getRadian();
0818 
0819     /**
0820      * Returns by pointer, unit of angle: revolution.
0821      * Caller owns returned value and must free it.
0822      * Also see {@link #getRevolutionAngle()}.
0823      * @param status ICU error code.
0824      * @stable ICU 56
0825      */
0826     static MeasureUnit *createRevolutionAngle(UErrorCode &status);
0827 
0828     /**
0829      * Returns by value, unit of angle: revolution.
0830      * Also see {@link #createRevolutionAngle()}.
0831      * @stable ICU 64
0832      */
0833     static MeasureUnit getRevolutionAngle();
0834 
0835     /**
0836      * Returns by pointer, unit of area: acre.
0837      * Caller owns returned value and must free it.
0838      * Also see {@link #getAcre()}.
0839      * @param status ICU error code.
0840      * @stable ICU 53
0841      */
0842     static MeasureUnit *createAcre(UErrorCode &status);
0843 
0844     /**
0845      * Returns by value, unit of area: acre.
0846      * Also see {@link #createAcre()}.
0847      * @stable ICU 64
0848      */
0849     static MeasureUnit getAcre();
0850 
0851     /**
0852      * Returns by pointer, unit of area: dunam.
0853      * Caller owns returned value and must free it.
0854      * Also see {@link #getDunam()}.
0855      * @param status ICU error code.
0856      * @stable ICU 64
0857      */
0858     static MeasureUnit *createDunam(UErrorCode &status);
0859 
0860     /**
0861      * Returns by value, unit of area: dunam.
0862      * Also see {@link #createDunam()}.
0863      * @stable ICU 64
0864      */
0865     static MeasureUnit getDunam();
0866 
0867     /**
0868      * Returns by pointer, unit of area: hectare.
0869      * Caller owns returned value and must free it.
0870      * Also see {@link #getHectare()}.
0871      * @param status ICU error code.
0872      * @stable ICU 53
0873      */
0874     static MeasureUnit *createHectare(UErrorCode &status);
0875 
0876     /**
0877      * Returns by value, unit of area: hectare.
0878      * Also see {@link #createHectare()}.
0879      * @stable ICU 64
0880      */
0881     static MeasureUnit getHectare();
0882 
0883     /**
0884      * Returns by pointer, unit of area: square-centimeter.
0885      * Caller owns returned value and must free it.
0886      * Also see {@link #getSquareCentimeter()}.
0887      * @param status ICU error code.
0888      * @stable ICU 54
0889      */
0890     static MeasureUnit *createSquareCentimeter(UErrorCode &status);
0891 
0892     /**
0893      * Returns by value, unit of area: square-centimeter.
0894      * Also see {@link #createSquareCentimeter()}.
0895      * @stable ICU 64
0896      */
0897     static MeasureUnit getSquareCentimeter();
0898 
0899     /**
0900      * Returns by pointer, unit of area: square-foot.
0901      * Caller owns returned value and must free it.
0902      * Also see {@link #getSquareFoot()}.
0903      * @param status ICU error code.
0904      * @stable ICU 53
0905      */
0906     static MeasureUnit *createSquareFoot(UErrorCode &status);
0907 
0908     /**
0909      * Returns by value, unit of area: square-foot.
0910      * Also see {@link #createSquareFoot()}.
0911      * @stable ICU 64
0912      */
0913     static MeasureUnit getSquareFoot();
0914 
0915     /**
0916      * Returns by pointer, unit of area: square-inch.
0917      * Caller owns returned value and must free it.
0918      * Also see {@link #getSquareInch()}.
0919      * @param status ICU error code.
0920      * @stable ICU 54
0921      */
0922     static MeasureUnit *createSquareInch(UErrorCode &status);
0923 
0924     /**
0925      * Returns by value, unit of area: square-inch.
0926      * Also see {@link #createSquareInch()}.
0927      * @stable ICU 64
0928      */
0929     static MeasureUnit getSquareInch();
0930 
0931     /**
0932      * Returns by pointer, unit of area: square-kilometer.
0933      * Caller owns returned value and must free it.
0934      * Also see {@link #getSquareKilometer()}.
0935      * @param status ICU error code.
0936      * @stable ICU 53
0937      */
0938     static MeasureUnit *createSquareKilometer(UErrorCode &status);
0939 
0940     /**
0941      * Returns by value, unit of area: square-kilometer.
0942      * Also see {@link #createSquareKilometer()}.
0943      * @stable ICU 64
0944      */
0945     static MeasureUnit getSquareKilometer();
0946 
0947     /**
0948      * Returns by pointer, unit of area: square-meter.
0949      * Caller owns returned value and must free it.
0950      * Also see {@link #getSquareMeter()}.
0951      * @param status ICU error code.
0952      * @stable ICU 53
0953      */
0954     static MeasureUnit *createSquareMeter(UErrorCode &status);
0955 
0956     /**
0957      * Returns by value, unit of area: square-meter.
0958      * Also see {@link #createSquareMeter()}.
0959      * @stable ICU 64
0960      */
0961     static MeasureUnit getSquareMeter();
0962 
0963     /**
0964      * Returns by pointer, unit of area: square-mile.
0965      * Caller owns returned value and must free it.
0966      * Also see {@link #getSquareMile()}.
0967      * @param status ICU error code.
0968      * @stable ICU 53
0969      */
0970     static MeasureUnit *createSquareMile(UErrorCode &status);
0971 
0972     /**
0973      * Returns by value, unit of area: square-mile.
0974      * Also see {@link #createSquareMile()}.
0975      * @stable ICU 64
0976      */
0977     static MeasureUnit getSquareMile();
0978 
0979     /**
0980      * Returns by pointer, unit of area: square-yard.
0981      * Caller owns returned value and must free it.
0982      * Also see {@link #getSquareYard()}.
0983      * @param status ICU error code.
0984      * @stable ICU 54
0985      */
0986     static MeasureUnit *createSquareYard(UErrorCode &status);
0987 
0988     /**
0989      * Returns by value, unit of area: square-yard.
0990      * Also see {@link #createSquareYard()}.
0991      * @stable ICU 64
0992      */
0993     static MeasureUnit getSquareYard();
0994 
0995     /**
0996      * Returns by pointer, unit of concentr: item.
0997      * Caller owns returned value and must free it.
0998      * Also see {@link #getItem()}.
0999      * @param status ICU error code.
1000      * @stable ICU 70
1001      */
1002     static MeasureUnit *createItem(UErrorCode &status);
1003 
1004     /**
1005      * Returns by value, unit of concentr: item.
1006      * Also see {@link #createItem()}.
1007      * @stable ICU 70
1008      */
1009     static MeasureUnit getItem();
1010 
1011     /**
1012      * Returns by pointer, unit of concentr: karat.
1013      * Caller owns returned value and must free it.
1014      * Also see {@link #getKarat()}.
1015      * @param status ICU error code.
1016      * @stable ICU 54
1017      */
1018     static MeasureUnit *createKarat(UErrorCode &status);
1019 
1020     /**
1021      * Returns by value, unit of concentr: karat.
1022      * Also see {@link #createKarat()}.
1023      * @stable ICU 64
1024      */
1025     static MeasureUnit getKarat();
1026 
1027     /**
1028      * Returns by pointer, unit of concentr: milligram-ofglucose-per-deciliter.
1029      * Caller owns returned value and must free it.
1030      * Also see {@link #getMilligramOfglucosePerDeciliter()}.
1031      * @param status ICU error code.
1032      * @stable ICU 69
1033      */
1034     static MeasureUnit *createMilligramOfglucosePerDeciliter(UErrorCode &status);
1035 
1036     /**
1037      * Returns by value, unit of concentr: milligram-ofglucose-per-deciliter.
1038      * Also see {@link #createMilligramOfglucosePerDeciliter()}.
1039      * @stable ICU 69
1040      */
1041     static MeasureUnit getMilligramOfglucosePerDeciliter();
1042 
1043     /**
1044      * Returns by pointer, unit of concentr: milligram-per-deciliter.
1045      * Caller owns returned value and must free it.
1046      * Also see {@link #getMilligramPerDeciliter()}.
1047      * @param status ICU error code.
1048      * @stable ICU 57
1049      */
1050     static MeasureUnit *createMilligramPerDeciliter(UErrorCode &status);
1051 
1052     /**
1053      * Returns by value, unit of concentr: milligram-per-deciliter.
1054      * Also see {@link #createMilligramPerDeciliter()}.
1055      * @stable ICU 64
1056      */
1057     static MeasureUnit getMilligramPerDeciliter();
1058 
1059     /**
1060      * Returns by pointer, unit of concentr: millimole-per-liter.
1061      * Caller owns returned value and must free it.
1062      * Also see {@link #getMillimolePerLiter()}.
1063      * @param status ICU error code.
1064      * @stable ICU 57
1065      */
1066     static MeasureUnit *createMillimolePerLiter(UErrorCode &status);
1067 
1068     /**
1069      * Returns by value, unit of concentr: millimole-per-liter.
1070      * Also see {@link #createMillimolePerLiter()}.
1071      * @stable ICU 64
1072      */
1073     static MeasureUnit getMillimolePerLiter();
1074 
1075     /**
1076      * Returns by pointer, unit of concentr: mole.
1077      * Caller owns returned value and must free it.
1078      * Also see {@link #getMole()}.
1079      * @param status ICU error code.
1080      * @stable ICU 64
1081      */
1082     static MeasureUnit *createMole(UErrorCode &status);
1083 
1084     /**
1085      * Returns by value, unit of concentr: mole.
1086      * Also see {@link #createMole()}.
1087      * @stable ICU 64
1088      */
1089     static MeasureUnit getMole();
1090 
1091     /**
1092      * Returns by pointer, unit of concentr: percent.
1093      * Caller owns returned value and must free it.
1094      * Also see {@link #getPercent()}.
1095      * @param status ICU error code.
1096      * @stable ICU 63
1097      */
1098     static MeasureUnit *createPercent(UErrorCode &status);
1099 
1100     /**
1101      * Returns by value, unit of concentr: percent.
1102      * Also see {@link #createPercent()}.
1103      * @stable ICU 64
1104      */
1105     static MeasureUnit getPercent();
1106 
1107     /**
1108      * Returns by pointer, unit of concentr: permille.
1109      * Caller owns returned value and must free it.
1110      * Also see {@link #getPermille()}.
1111      * @param status ICU error code.
1112      * @stable ICU 63
1113      */
1114     static MeasureUnit *createPermille(UErrorCode &status);
1115 
1116     /**
1117      * Returns by value, unit of concentr: permille.
1118      * Also see {@link #createPermille()}.
1119      * @stable ICU 64
1120      */
1121     static MeasureUnit getPermille();
1122 
1123     /**
1124      * Returns by pointer, unit of concentr: permillion.
1125      * Caller owns returned value and must free it.
1126      * Also see {@link #getPartPerMillion()}.
1127      * @param status ICU error code.
1128      * @stable ICU 57
1129      */
1130     static MeasureUnit *createPartPerMillion(UErrorCode &status);
1131 
1132     /**
1133      * Returns by value, unit of concentr: permillion.
1134      * Also see {@link #createPartPerMillion()}.
1135      * @stable ICU 64
1136      */
1137     static MeasureUnit getPartPerMillion();
1138 
1139     /**
1140      * Returns by pointer, unit of concentr: permyriad.
1141      * Caller owns returned value and must free it.
1142      * Also see {@link #getPermyriad()}.
1143      * @param status ICU error code.
1144      * @stable ICU 64
1145      */
1146     static MeasureUnit *createPermyriad(UErrorCode &status);
1147 
1148     /**
1149      * Returns by value, unit of concentr: permyriad.
1150      * Also see {@link #createPermyriad()}.
1151      * @stable ICU 64
1152      */
1153     static MeasureUnit getPermyriad();
1154 
1155     /**
1156      * Returns by pointer, unit of consumption: liter-per-100-kilometer.
1157      * Caller owns returned value and must free it.
1158      * Also see {@link #getLiterPer100Kilometers()}.
1159      * @param status ICU error code.
1160      * @stable ICU 56
1161      */
1162     static MeasureUnit *createLiterPer100Kilometers(UErrorCode &status);
1163 
1164     /**
1165      * Returns by value, unit of consumption: liter-per-100-kilometer.
1166      * Also see {@link #createLiterPer100Kilometers()}.
1167      * @stable ICU 64
1168      */
1169     static MeasureUnit getLiterPer100Kilometers();
1170 
1171     /**
1172      * Returns by pointer, unit of consumption: liter-per-kilometer.
1173      * Caller owns returned value and must free it.
1174      * Also see {@link #getLiterPerKilometer()}.
1175      * @param status ICU error code.
1176      * @stable ICU 54
1177      */
1178     static MeasureUnit *createLiterPerKilometer(UErrorCode &status);
1179 
1180     /**
1181      * Returns by value, unit of consumption: liter-per-kilometer.
1182      * Also see {@link #createLiterPerKilometer()}.
1183      * @stable ICU 64
1184      */
1185     static MeasureUnit getLiterPerKilometer();
1186 
1187     /**
1188      * Returns by pointer, unit of consumption: mile-per-gallon.
1189      * Caller owns returned value and must free it.
1190      * Also see {@link #getMilePerGallon()}.
1191      * @param status ICU error code.
1192      * @stable ICU 54
1193      */
1194     static MeasureUnit *createMilePerGallon(UErrorCode &status);
1195 
1196     /**
1197      * Returns by value, unit of consumption: mile-per-gallon.
1198      * Also see {@link #createMilePerGallon()}.
1199      * @stable ICU 64
1200      */
1201     static MeasureUnit getMilePerGallon();
1202 
1203     /**
1204      * Returns by pointer, unit of consumption: mile-per-gallon-imperial.
1205      * Caller owns returned value and must free it.
1206      * Also see {@link #getMilePerGallonImperial()}.
1207      * @param status ICU error code.
1208      * @stable ICU 57
1209      */
1210     static MeasureUnit *createMilePerGallonImperial(UErrorCode &status);
1211 
1212     /**
1213      * Returns by value, unit of consumption: mile-per-gallon-imperial.
1214      * Also see {@link #createMilePerGallonImperial()}.
1215      * @stable ICU 64
1216      */
1217     static MeasureUnit getMilePerGallonImperial();
1218 
1219     /**
1220      * Returns by pointer, unit of digital: bit.
1221      * Caller owns returned value and must free it.
1222      * Also see {@link #getBit()}.
1223      * @param status ICU error code.
1224      * @stable ICU 54
1225      */
1226     static MeasureUnit *createBit(UErrorCode &status);
1227 
1228     /**
1229      * Returns by value, unit of digital: bit.
1230      * Also see {@link #createBit()}.
1231      * @stable ICU 64
1232      */
1233     static MeasureUnit getBit();
1234 
1235     /**
1236      * Returns by pointer, unit of digital: byte.
1237      * Caller owns returned value and must free it.
1238      * Also see {@link #getByte()}.
1239      * @param status ICU error code.
1240      * @stable ICU 54
1241      */
1242     static MeasureUnit *createByte(UErrorCode &status);
1243 
1244     /**
1245      * Returns by value, unit of digital: byte.
1246      * Also see {@link #createByte()}.
1247      * @stable ICU 64
1248      */
1249     static MeasureUnit getByte();
1250 
1251     /**
1252      * Returns by pointer, unit of digital: gigabit.
1253      * Caller owns returned value and must free it.
1254      * Also see {@link #getGigabit()}.
1255      * @param status ICU error code.
1256      * @stable ICU 54
1257      */
1258     static MeasureUnit *createGigabit(UErrorCode &status);
1259 
1260     /**
1261      * Returns by value, unit of digital: gigabit.
1262      * Also see {@link #createGigabit()}.
1263      * @stable ICU 64
1264      */
1265     static MeasureUnit getGigabit();
1266 
1267     /**
1268      * Returns by pointer, unit of digital: gigabyte.
1269      * Caller owns returned value and must free it.
1270      * Also see {@link #getGigabyte()}.
1271      * @param status ICU error code.
1272      * @stable ICU 54
1273      */
1274     static MeasureUnit *createGigabyte(UErrorCode &status);
1275 
1276     /**
1277      * Returns by value, unit of digital: gigabyte.
1278      * Also see {@link #createGigabyte()}.
1279      * @stable ICU 64
1280      */
1281     static MeasureUnit getGigabyte();
1282 
1283     /**
1284      * Returns by pointer, unit of digital: kilobit.
1285      * Caller owns returned value and must free it.
1286      * Also see {@link #getKilobit()}.
1287      * @param status ICU error code.
1288      * @stable ICU 54
1289      */
1290     static MeasureUnit *createKilobit(UErrorCode &status);
1291 
1292     /**
1293      * Returns by value, unit of digital: kilobit.
1294      * Also see {@link #createKilobit()}.
1295      * @stable ICU 64
1296      */
1297     static MeasureUnit getKilobit();
1298 
1299     /**
1300      * Returns by pointer, unit of digital: kilobyte.
1301      * Caller owns returned value and must free it.
1302      * Also see {@link #getKilobyte()}.
1303      * @param status ICU error code.
1304      * @stable ICU 54
1305      */
1306     static MeasureUnit *createKilobyte(UErrorCode &status);
1307 
1308     /**
1309      * Returns by value, unit of digital: kilobyte.
1310      * Also see {@link #createKilobyte()}.
1311      * @stable ICU 64
1312      */
1313     static MeasureUnit getKilobyte();
1314 
1315     /**
1316      * Returns by pointer, unit of digital: megabit.
1317      * Caller owns returned value and must free it.
1318      * Also see {@link #getMegabit()}.
1319      * @param status ICU error code.
1320      * @stable ICU 54
1321      */
1322     static MeasureUnit *createMegabit(UErrorCode &status);
1323 
1324     /**
1325      * Returns by value, unit of digital: megabit.
1326      * Also see {@link #createMegabit()}.
1327      * @stable ICU 64
1328      */
1329     static MeasureUnit getMegabit();
1330 
1331     /**
1332      * Returns by pointer, unit of digital: megabyte.
1333      * Caller owns returned value and must free it.
1334      * Also see {@link #getMegabyte()}.
1335      * @param status ICU error code.
1336      * @stable ICU 54
1337      */
1338     static MeasureUnit *createMegabyte(UErrorCode &status);
1339 
1340     /**
1341      * Returns by value, unit of digital: megabyte.
1342      * Also see {@link #createMegabyte()}.
1343      * @stable ICU 64
1344      */
1345     static MeasureUnit getMegabyte();
1346 
1347     /**
1348      * Returns by pointer, unit of digital: petabyte.
1349      * Caller owns returned value and must free it.
1350      * Also see {@link #getPetabyte()}.
1351      * @param status ICU error code.
1352      * @stable ICU 63
1353      */
1354     static MeasureUnit *createPetabyte(UErrorCode &status);
1355 
1356     /**
1357      * Returns by value, unit of digital: petabyte.
1358      * Also see {@link #createPetabyte()}.
1359      * @stable ICU 64
1360      */
1361     static MeasureUnit getPetabyte();
1362 
1363     /**
1364      * Returns by pointer, unit of digital: terabit.
1365      * Caller owns returned value and must free it.
1366      * Also see {@link #getTerabit()}.
1367      * @param status ICU error code.
1368      * @stable ICU 54
1369      */
1370     static MeasureUnit *createTerabit(UErrorCode &status);
1371 
1372     /**
1373      * Returns by value, unit of digital: terabit.
1374      * Also see {@link #createTerabit()}.
1375      * @stable ICU 64
1376      */
1377     static MeasureUnit getTerabit();
1378 
1379     /**
1380      * Returns by pointer, unit of digital: terabyte.
1381      * Caller owns returned value and must free it.
1382      * Also see {@link #getTerabyte()}.
1383      * @param status ICU error code.
1384      * @stable ICU 54
1385      */
1386     static MeasureUnit *createTerabyte(UErrorCode &status);
1387 
1388     /**
1389      * Returns by value, unit of digital: terabyte.
1390      * Also see {@link #createTerabyte()}.
1391      * @stable ICU 64
1392      */
1393     static MeasureUnit getTerabyte();
1394 
1395     /**
1396      * Returns by pointer, unit of duration: century.
1397      * Caller owns returned value and must free it.
1398      * Also see {@link #getCentury()}.
1399      * @param status ICU error code.
1400      * @stable ICU 56
1401      */
1402     static MeasureUnit *createCentury(UErrorCode &status);
1403 
1404     /**
1405      * Returns by value, unit of duration: century.
1406      * Also see {@link #createCentury()}.
1407      * @stable ICU 64
1408      */
1409     static MeasureUnit getCentury();
1410 
1411     /**
1412      * Returns by pointer, unit of duration: day.
1413      * Caller owns returned value and must free it.
1414      * Also see {@link #getDay()}.
1415      * @param status ICU error code.
1416      * @stable ICU 53
1417      */
1418     static MeasureUnit *createDay(UErrorCode &status);
1419 
1420     /**
1421      * Returns by value, unit of duration: day.
1422      * Also see {@link #createDay()}.
1423      * @stable ICU 64
1424      */
1425     static MeasureUnit getDay();
1426 
1427     /**
1428      * Returns by pointer, unit of duration: day-person.
1429      * Caller owns returned value and must free it.
1430      * Also see {@link #getDayPerson()}.
1431      * @param status ICU error code.
1432      * @stable ICU 64
1433      */
1434     static MeasureUnit *createDayPerson(UErrorCode &status);
1435 
1436     /**
1437      * Returns by value, unit of duration: day-person.
1438      * Also see {@link #createDayPerson()}.
1439      * @stable ICU 64
1440      */
1441     static MeasureUnit getDayPerson();
1442 
1443     /**
1444      * Returns by pointer, unit of duration: decade.
1445      * Caller owns returned value and must free it.
1446      * Also see {@link #getDecade()}.
1447      * @param status ICU error code.
1448      * @stable ICU 65
1449      */
1450     static MeasureUnit *createDecade(UErrorCode &status);
1451 
1452     /**
1453      * Returns by value, unit of duration: decade.
1454      * Also see {@link #createDecade()}.
1455      * @stable ICU 65
1456      */
1457     static MeasureUnit getDecade();
1458 
1459     /**
1460      * Returns by pointer, unit of duration: hour.
1461      * Caller owns returned value and must free it.
1462      * Also see {@link #getHour()}.
1463      * @param status ICU error code.
1464      * @stable ICU 53
1465      */
1466     static MeasureUnit *createHour(UErrorCode &status);
1467 
1468     /**
1469      * Returns by value, unit of duration: hour.
1470      * Also see {@link #createHour()}.
1471      * @stable ICU 64
1472      */
1473     static MeasureUnit getHour();
1474 
1475     /**
1476      * Returns by pointer, unit of duration: microsecond.
1477      * Caller owns returned value and must free it.
1478      * Also see {@link #getMicrosecond()}.
1479      * @param status ICU error code.
1480      * @stable ICU 54
1481      */
1482     static MeasureUnit *createMicrosecond(UErrorCode &status);
1483 
1484     /**
1485      * Returns by value, unit of duration: microsecond.
1486      * Also see {@link #createMicrosecond()}.
1487      * @stable ICU 64
1488      */
1489     static MeasureUnit getMicrosecond();
1490 
1491     /**
1492      * Returns by pointer, unit of duration: millisecond.
1493      * Caller owns returned value and must free it.
1494      * Also see {@link #getMillisecond()}.
1495      * @param status ICU error code.
1496      * @stable ICU 53
1497      */
1498     static MeasureUnit *createMillisecond(UErrorCode &status);
1499 
1500     /**
1501      * Returns by value, unit of duration: millisecond.
1502      * Also see {@link #createMillisecond()}.
1503      * @stable ICU 64
1504      */
1505     static MeasureUnit getMillisecond();
1506 
1507     /**
1508      * Returns by pointer, unit of duration: minute.
1509      * Caller owns returned value and must free it.
1510      * Also see {@link #getMinute()}.
1511      * @param status ICU error code.
1512      * @stable ICU 53
1513      */
1514     static MeasureUnit *createMinute(UErrorCode &status);
1515 
1516     /**
1517      * Returns by value, unit of duration: minute.
1518      * Also see {@link #createMinute()}.
1519      * @stable ICU 64
1520      */
1521     static MeasureUnit getMinute();
1522 
1523     /**
1524      * Returns by pointer, unit of duration: month.
1525      * Caller owns returned value and must free it.
1526      * Also see {@link #getMonth()}.
1527      * @param status ICU error code.
1528      * @stable ICU 53
1529      */
1530     static MeasureUnit *createMonth(UErrorCode &status);
1531 
1532     /**
1533      * Returns by value, unit of duration: month.
1534      * Also see {@link #createMonth()}.
1535      * @stable ICU 64
1536      */
1537     static MeasureUnit getMonth();
1538 
1539     /**
1540      * Returns by pointer, unit of duration: month-person.
1541      * Caller owns returned value and must free it.
1542      * Also see {@link #getMonthPerson()}.
1543      * @param status ICU error code.
1544      * @stable ICU 64
1545      */
1546     static MeasureUnit *createMonthPerson(UErrorCode &status);
1547 
1548     /**
1549      * Returns by value, unit of duration: month-person.
1550      * Also see {@link #createMonthPerson()}.
1551      * @stable ICU 64
1552      */
1553     static MeasureUnit getMonthPerson();
1554 
1555     /**
1556      * Returns by pointer, unit of duration: nanosecond.
1557      * Caller owns returned value and must free it.
1558      * Also see {@link #getNanosecond()}.
1559      * @param status ICU error code.
1560      * @stable ICU 54
1561      */
1562     static MeasureUnit *createNanosecond(UErrorCode &status);
1563 
1564     /**
1565      * Returns by value, unit of duration: nanosecond.
1566      * Also see {@link #createNanosecond()}.
1567      * @stable ICU 64
1568      */
1569     static MeasureUnit getNanosecond();
1570 
1571 #ifndef U_HIDE_DRAFT_API
1572     /**
1573      * Returns by pointer, unit of duration: night.
1574      * Caller owns returned value and must free it.
1575      * Also see {@link #getNight()}.
1576      * @param status ICU error code.
1577      * @draft ICU 76
1578      */
1579     static MeasureUnit *createNight(UErrorCode &status);
1580 
1581     /**
1582      * Returns by value, unit of duration: night.
1583      * Also see {@link #createNight()}.
1584      * @draft ICU 76
1585      */
1586     static MeasureUnit getNight();
1587 #endif /* U_HIDE_DRAFT_API */
1588 
1589     /**
1590      * Returns by pointer, unit of duration: quarter.
1591      * Caller owns returned value and must free it.
1592      * Also see {@link #getQuarter()}.
1593      * @param status ICU error code.
1594      * @stable ICU 72
1595      */
1596     static MeasureUnit *createQuarter(UErrorCode &status);
1597 
1598     /**
1599      * Returns by value, unit of duration: quarter.
1600      * Also see {@link #createQuarter()}.
1601      * @stable ICU 72
1602      */
1603     static MeasureUnit getQuarter();
1604 
1605     /**
1606      * Returns by pointer, unit of duration: second.
1607      * Caller owns returned value and must free it.
1608      * Also see {@link #getSecond()}.
1609      * @param status ICU error code.
1610      * @stable ICU 53
1611      */
1612     static MeasureUnit *createSecond(UErrorCode &status);
1613 
1614     /**
1615      * Returns by value, unit of duration: second.
1616      * Also see {@link #createSecond()}.
1617      * @stable ICU 64
1618      */
1619     static MeasureUnit getSecond();
1620 
1621     /**
1622      * Returns by pointer, unit of duration: week.
1623      * Caller owns returned value and must free it.
1624      * Also see {@link #getWeek()}.
1625      * @param status ICU error code.
1626      * @stable ICU 53
1627      */
1628     static MeasureUnit *createWeek(UErrorCode &status);
1629 
1630     /**
1631      * Returns by value, unit of duration: week.
1632      * Also see {@link #createWeek()}.
1633      * @stable ICU 64
1634      */
1635     static MeasureUnit getWeek();
1636 
1637     /**
1638      * Returns by pointer, unit of duration: week-person.
1639      * Caller owns returned value and must free it.
1640      * Also see {@link #getWeekPerson()}.
1641      * @param status ICU error code.
1642      * @stable ICU 64
1643      */
1644     static MeasureUnit *createWeekPerson(UErrorCode &status);
1645 
1646     /**
1647      * Returns by value, unit of duration: week-person.
1648      * Also see {@link #createWeekPerson()}.
1649      * @stable ICU 64
1650      */
1651     static MeasureUnit getWeekPerson();
1652 
1653     /**
1654      * Returns by pointer, unit of duration: year.
1655      * Caller owns returned value and must free it.
1656      * Also see {@link #getYear()}.
1657      * @param status ICU error code.
1658      * @stable ICU 53
1659      */
1660     static MeasureUnit *createYear(UErrorCode &status);
1661 
1662     /**
1663      * Returns by value, unit of duration: year.
1664      * Also see {@link #createYear()}.
1665      * @stable ICU 64
1666      */
1667     static MeasureUnit getYear();
1668 
1669     /**
1670      * Returns by pointer, unit of duration: year-person.
1671      * Caller owns returned value and must free it.
1672      * Also see {@link #getYearPerson()}.
1673      * @param status ICU error code.
1674      * @stable ICU 64
1675      */
1676     static MeasureUnit *createYearPerson(UErrorCode &status);
1677 
1678     /**
1679      * Returns by value, unit of duration: year-person.
1680      * Also see {@link #createYearPerson()}.
1681      * @stable ICU 64
1682      */
1683     static MeasureUnit getYearPerson();
1684 
1685     /**
1686      * Returns by pointer, unit of electric: ampere.
1687      * Caller owns returned value and must free it.
1688      * Also see {@link #getAmpere()}.
1689      * @param status ICU error code.
1690      * @stable ICU 54
1691      */
1692     static MeasureUnit *createAmpere(UErrorCode &status);
1693 
1694     /**
1695      * Returns by value, unit of electric: ampere.
1696      * Also see {@link #createAmpere()}.
1697      * @stable ICU 64
1698      */
1699     static MeasureUnit getAmpere();
1700 
1701     /**
1702      * Returns by pointer, unit of electric: milliampere.
1703      * Caller owns returned value and must free it.
1704      * Also see {@link #getMilliampere()}.
1705      * @param status ICU error code.
1706      * @stable ICU 54
1707      */
1708     static MeasureUnit *createMilliampere(UErrorCode &status);
1709 
1710     /**
1711      * Returns by value, unit of electric: milliampere.
1712      * Also see {@link #createMilliampere()}.
1713      * @stable ICU 64
1714      */
1715     static MeasureUnit getMilliampere();
1716 
1717     /**
1718      * Returns by pointer, unit of electric: ohm.
1719      * Caller owns returned value and must free it.
1720      * Also see {@link #getOhm()}.
1721      * @param status ICU error code.
1722      * @stable ICU 54
1723      */
1724     static MeasureUnit *createOhm(UErrorCode &status);
1725 
1726     /**
1727      * Returns by value, unit of electric: ohm.
1728      * Also see {@link #createOhm()}.
1729      * @stable ICU 64
1730      */
1731     static MeasureUnit getOhm();
1732 
1733     /**
1734      * Returns by pointer, unit of electric: volt.
1735      * Caller owns returned value and must free it.
1736      * Also see {@link #getVolt()}.
1737      * @param status ICU error code.
1738      * @stable ICU 54
1739      */
1740     static MeasureUnit *createVolt(UErrorCode &status);
1741 
1742     /**
1743      * Returns by value, unit of electric: volt.
1744      * Also see {@link #createVolt()}.
1745      * @stable ICU 64
1746      */
1747     static MeasureUnit getVolt();
1748 
1749     /**
1750      * Returns by pointer, unit of energy: british-thermal-unit.
1751      * Caller owns returned value and must free it.
1752      * Also see {@link #getBritishThermalUnit()}.
1753      * @param status ICU error code.
1754      * @stable ICU 64
1755      */
1756     static MeasureUnit *createBritishThermalUnit(UErrorCode &status);
1757 
1758     /**
1759      * Returns by value, unit of energy: british-thermal-unit.
1760      * Also see {@link #createBritishThermalUnit()}.
1761      * @stable ICU 64
1762      */
1763     static MeasureUnit getBritishThermalUnit();
1764 
1765     /**
1766      * Returns by pointer, unit of energy: calorie.
1767      * Caller owns returned value and must free it.
1768      * Also see {@link #getCalorie()}.
1769      * @param status ICU error code.
1770      * @stable ICU 54
1771      */
1772     static MeasureUnit *createCalorie(UErrorCode &status);
1773 
1774     /**
1775      * Returns by value, unit of energy: calorie.
1776      * Also see {@link #createCalorie()}.
1777      * @stable ICU 64
1778      */
1779     static MeasureUnit getCalorie();
1780 
1781     /**
1782      * Returns by pointer, unit of energy: electronvolt.
1783      * Caller owns returned value and must free it.
1784      * Also see {@link #getElectronvolt()}.
1785      * @param status ICU error code.
1786      * @stable ICU 64
1787      */
1788     static MeasureUnit *createElectronvolt(UErrorCode &status);
1789 
1790     /**
1791      * Returns by value, unit of energy: electronvolt.
1792      * Also see {@link #createElectronvolt()}.
1793      * @stable ICU 64
1794      */
1795     static MeasureUnit getElectronvolt();
1796 
1797     /**
1798      * Returns by pointer, unit of energy: foodcalorie.
1799      * Caller owns returned value and must free it.
1800      * Also see {@link #getFoodcalorie()}.
1801      * @param status ICU error code.
1802      * @stable ICU 54
1803      */
1804     static MeasureUnit *createFoodcalorie(UErrorCode &status);
1805 
1806     /**
1807      * Returns by value, unit of energy: foodcalorie.
1808      * Also see {@link #createFoodcalorie()}.
1809      * @stable ICU 64
1810      */
1811     static MeasureUnit getFoodcalorie();
1812 
1813     /**
1814      * Returns by pointer, unit of energy: joule.
1815      * Caller owns returned value and must free it.
1816      * Also see {@link #getJoule()}.
1817      * @param status ICU error code.
1818      * @stable ICU 54
1819      */
1820     static MeasureUnit *createJoule(UErrorCode &status);
1821 
1822     /**
1823      * Returns by value, unit of energy: joule.
1824      * Also see {@link #createJoule()}.
1825      * @stable ICU 64
1826      */
1827     static MeasureUnit getJoule();
1828 
1829     /**
1830      * Returns by pointer, unit of energy: kilocalorie.
1831      * Caller owns returned value and must free it.
1832      * Also see {@link #getKilocalorie()}.
1833      * @param status ICU error code.
1834      * @stable ICU 54
1835      */
1836     static MeasureUnit *createKilocalorie(UErrorCode &status);
1837 
1838     /**
1839      * Returns by value, unit of energy: kilocalorie.
1840      * Also see {@link #createKilocalorie()}.
1841      * @stable ICU 64
1842      */
1843     static MeasureUnit getKilocalorie();
1844 
1845     /**
1846      * Returns by pointer, unit of energy: kilojoule.
1847      * Caller owns returned value and must free it.
1848      * Also see {@link #getKilojoule()}.
1849      * @param status ICU error code.
1850      * @stable ICU 54
1851      */
1852     static MeasureUnit *createKilojoule(UErrorCode &status);
1853 
1854     /**
1855      * Returns by value, unit of energy: kilojoule.
1856      * Also see {@link #createKilojoule()}.
1857      * @stable ICU 64
1858      */
1859     static MeasureUnit getKilojoule();
1860 
1861     /**
1862      * Returns by pointer, unit of energy: kilowatt-hour.
1863      * Caller owns returned value and must free it.
1864      * Also see {@link #getKilowattHour()}.
1865      * @param status ICU error code.
1866      * @stable ICU 54
1867      */
1868     static MeasureUnit *createKilowattHour(UErrorCode &status);
1869 
1870     /**
1871      * Returns by value, unit of energy: kilowatt-hour.
1872      * Also see {@link #createKilowattHour()}.
1873      * @stable ICU 64
1874      */
1875     static MeasureUnit getKilowattHour();
1876 
1877     /**
1878      * Returns by pointer, unit of energy: therm-us.
1879      * Caller owns returned value and must free it.
1880      * Also see {@link #getThermUs()}.
1881      * @param status ICU error code.
1882      * @stable ICU 65
1883      */
1884     static MeasureUnit *createThermUs(UErrorCode &status);
1885 
1886     /**
1887      * Returns by value, unit of energy: therm-us.
1888      * Also see {@link #createThermUs()}.
1889      * @stable ICU 65
1890      */
1891     static MeasureUnit getThermUs();
1892 
1893     /**
1894      * Returns by pointer, unit of force: kilowatt-hour-per-100-kilometer.
1895      * Caller owns returned value and must free it.
1896      * Also see {@link #getKilowattHourPer100Kilometer()}.
1897      * @param status ICU error code.
1898      * @stable ICU 70
1899      */
1900     static MeasureUnit *createKilowattHourPer100Kilometer(UErrorCode &status);
1901 
1902     /**
1903      * Returns by value, unit of force: kilowatt-hour-per-100-kilometer.
1904      * Also see {@link #createKilowattHourPer100Kilometer()}.
1905      * @stable ICU 70
1906      */
1907     static MeasureUnit getKilowattHourPer100Kilometer();
1908 
1909     /**
1910      * Returns by pointer, unit of force: newton.
1911      * Caller owns returned value and must free it.
1912      * Also see {@link #getNewton()}.
1913      * @param status ICU error code.
1914      * @stable ICU 64
1915      */
1916     static MeasureUnit *createNewton(UErrorCode &status);
1917 
1918     /**
1919      * Returns by value, unit of force: newton.
1920      * Also see {@link #createNewton()}.
1921      * @stable ICU 64
1922      */
1923     static MeasureUnit getNewton();
1924 
1925     /**
1926      * Returns by pointer, unit of force: pound-force.
1927      * Caller owns returned value and must free it.
1928      * Also see {@link #getPoundForce()}.
1929      * @param status ICU error code.
1930      * @stable ICU 64
1931      */
1932     static MeasureUnit *createPoundForce(UErrorCode &status);
1933 
1934     /**
1935      * Returns by value, unit of force: pound-force.
1936      * Also see {@link #createPoundForce()}.
1937      * @stable ICU 64
1938      */
1939     static MeasureUnit getPoundForce();
1940 
1941     /**
1942      * Returns by pointer, unit of frequency: gigahertz.
1943      * Caller owns returned value and must free it.
1944      * Also see {@link #getGigahertz()}.
1945      * @param status ICU error code.
1946      * @stable ICU 54
1947      */
1948     static MeasureUnit *createGigahertz(UErrorCode &status);
1949 
1950     /**
1951      * Returns by value, unit of frequency: gigahertz.
1952      * Also see {@link #createGigahertz()}.
1953      * @stable ICU 64
1954      */
1955     static MeasureUnit getGigahertz();
1956 
1957     /**
1958      * Returns by pointer, unit of frequency: hertz.
1959      * Caller owns returned value and must free it.
1960      * Also see {@link #getHertz()}.
1961      * @param status ICU error code.
1962      * @stable ICU 54
1963      */
1964     static MeasureUnit *createHertz(UErrorCode &status);
1965 
1966     /**
1967      * Returns by value, unit of frequency: hertz.
1968      * Also see {@link #createHertz()}.
1969      * @stable ICU 64
1970      */
1971     static MeasureUnit getHertz();
1972 
1973     /**
1974      * Returns by pointer, unit of frequency: kilohertz.
1975      * Caller owns returned value and must free it.
1976      * Also see {@link #getKilohertz()}.
1977      * @param status ICU error code.
1978      * @stable ICU 54
1979      */
1980     static MeasureUnit *createKilohertz(UErrorCode &status);
1981 
1982     /**
1983      * Returns by value, unit of frequency: kilohertz.
1984      * Also see {@link #createKilohertz()}.
1985      * @stable ICU 64
1986      */
1987     static MeasureUnit getKilohertz();
1988 
1989     /**
1990      * Returns by pointer, unit of frequency: megahertz.
1991      * Caller owns returned value and must free it.
1992      * Also see {@link #getMegahertz()}.
1993      * @param status ICU error code.
1994      * @stable ICU 54
1995      */
1996     static MeasureUnit *createMegahertz(UErrorCode &status);
1997 
1998     /**
1999      * Returns by value, unit of frequency: megahertz.
2000      * Also see {@link #createMegahertz()}.
2001      * @stable ICU 64
2002      */
2003     static MeasureUnit getMegahertz();
2004 
2005     /**
2006      * Returns by pointer, unit of graphics: dot.
2007      * Caller owns returned value and must free it.
2008      * Also see {@link #getDot()}.
2009      * @param status ICU error code.
2010      * @stable ICU 68
2011      */
2012     static MeasureUnit *createDot(UErrorCode &status);
2013 
2014     /**
2015      * Returns by value, unit of graphics: dot.
2016      * Also see {@link #createDot()}.
2017      * @stable ICU 68
2018      */
2019     static MeasureUnit getDot();
2020 
2021     /**
2022      * Returns by pointer, unit of graphics: dot-per-centimeter.
2023      * Caller owns returned value and must free it.
2024      * Also see {@link #getDotPerCentimeter()}.
2025      * @param status ICU error code.
2026      * @stable ICU 65
2027      */
2028     static MeasureUnit *createDotPerCentimeter(UErrorCode &status);
2029 
2030     /**
2031      * Returns by value, unit of graphics: dot-per-centimeter.
2032      * Also see {@link #createDotPerCentimeter()}.
2033      * @stable ICU 65
2034      */
2035     static MeasureUnit getDotPerCentimeter();
2036 
2037     /**
2038      * Returns by pointer, unit of graphics: dot-per-inch.
2039      * Caller owns returned value and must free it.
2040      * Also see {@link #getDotPerInch()}.
2041      * @param status ICU error code.
2042      * @stable ICU 65
2043      */
2044     static MeasureUnit *createDotPerInch(UErrorCode &status);
2045 
2046     /**
2047      * Returns by value, unit of graphics: dot-per-inch.
2048      * Also see {@link #createDotPerInch()}.
2049      * @stable ICU 65
2050      */
2051     static MeasureUnit getDotPerInch();
2052 
2053     /**
2054      * Returns by pointer, unit of graphics: em.
2055      * Caller owns returned value and must free it.
2056      * Also see {@link #getEm()}.
2057      * @param status ICU error code.
2058      * @stable ICU 65
2059      */
2060     static MeasureUnit *createEm(UErrorCode &status);
2061 
2062     /**
2063      * Returns by value, unit of graphics: em.
2064      * Also see {@link #createEm()}.
2065      * @stable ICU 65
2066      */
2067     static MeasureUnit getEm();
2068 
2069     /**
2070      * Returns by pointer, unit of graphics: megapixel.
2071      * Caller owns returned value and must free it.
2072      * Also see {@link #getMegapixel()}.
2073      * @param status ICU error code.
2074      * @stable ICU 65
2075      */
2076     static MeasureUnit *createMegapixel(UErrorCode &status);
2077 
2078     /**
2079      * Returns by value, unit of graphics: megapixel.
2080      * Also see {@link #createMegapixel()}.
2081      * @stable ICU 65
2082      */
2083     static MeasureUnit getMegapixel();
2084 
2085     /**
2086      * Returns by pointer, unit of graphics: pixel.
2087      * Caller owns returned value and must free it.
2088      * Also see {@link #getPixel()}.
2089      * @param status ICU error code.
2090      * @stable ICU 65
2091      */
2092     static MeasureUnit *createPixel(UErrorCode &status);
2093 
2094     /**
2095      * Returns by value, unit of graphics: pixel.
2096      * Also see {@link #createPixel()}.
2097      * @stable ICU 65
2098      */
2099     static MeasureUnit getPixel();
2100 
2101     /**
2102      * Returns by pointer, unit of graphics: pixel-per-centimeter.
2103      * Caller owns returned value and must free it.
2104      * Also see {@link #getPixelPerCentimeter()}.
2105      * @param status ICU error code.
2106      * @stable ICU 65
2107      */
2108     static MeasureUnit *createPixelPerCentimeter(UErrorCode &status);
2109 
2110     /**
2111      * Returns by value, unit of graphics: pixel-per-centimeter.
2112      * Also see {@link #createPixelPerCentimeter()}.
2113      * @stable ICU 65
2114      */
2115     static MeasureUnit getPixelPerCentimeter();
2116 
2117     /**
2118      * Returns by pointer, unit of graphics: pixel-per-inch.
2119      * Caller owns returned value and must free it.
2120      * Also see {@link #getPixelPerInch()}.
2121      * @param status ICU error code.
2122      * @stable ICU 65
2123      */
2124     static MeasureUnit *createPixelPerInch(UErrorCode &status);
2125 
2126     /**
2127      * Returns by value, unit of graphics: pixel-per-inch.
2128      * Also see {@link #createPixelPerInch()}.
2129      * @stable ICU 65
2130      */
2131     static MeasureUnit getPixelPerInch();
2132 
2133     /**
2134      * Returns by pointer, unit of length: astronomical-unit.
2135      * Caller owns returned value and must free it.
2136      * Also see {@link #getAstronomicalUnit()}.
2137      * @param status ICU error code.
2138      * @stable ICU 54
2139      */
2140     static MeasureUnit *createAstronomicalUnit(UErrorCode &status);
2141 
2142     /**
2143      * Returns by value, unit of length: astronomical-unit.
2144      * Also see {@link #createAstronomicalUnit()}.
2145      * @stable ICU 64
2146      */
2147     static MeasureUnit getAstronomicalUnit();
2148 
2149     /**
2150      * Returns by pointer, unit of length: centimeter.
2151      * Caller owns returned value and must free it.
2152      * Also see {@link #getCentimeter()}.
2153      * @param status ICU error code.
2154      * @stable ICU 53
2155      */
2156     static MeasureUnit *createCentimeter(UErrorCode &status);
2157 
2158     /**
2159      * Returns by value, unit of length: centimeter.
2160      * Also see {@link #createCentimeter()}.
2161      * @stable ICU 64
2162      */
2163     static MeasureUnit getCentimeter();
2164 
2165     /**
2166      * Returns by pointer, unit of length: decimeter.
2167      * Caller owns returned value and must free it.
2168      * Also see {@link #getDecimeter()}.
2169      * @param status ICU error code.
2170      * @stable ICU 54
2171      */
2172     static MeasureUnit *createDecimeter(UErrorCode &status);
2173 
2174     /**
2175      * Returns by value, unit of length: decimeter.
2176      * Also see {@link #createDecimeter()}.
2177      * @stable ICU 64
2178      */
2179     static MeasureUnit getDecimeter();
2180 
2181     /**
2182      * Returns by pointer, unit of length: earth-radius.
2183      * Caller owns returned value and must free it.
2184      * Also see {@link #getEarthRadius()}.
2185      * @param status ICU error code.
2186      * @stable ICU 68
2187      */
2188     static MeasureUnit *createEarthRadius(UErrorCode &status);
2189 
2190     /**
2191      * Returns by value, unit of length: earth-radius.
2192      * Also see {@link #createEarthRadius()}.
2193      * @stable ICU 68
2194      */
2195     static MeasureUnit getEarthRadius();
2196 
2197     /**
2198      * Returns by pointer, unit of length: fathom.
2199      * Caller owns returned value and must free it.
2200      * Also see {@link #getFathom()}.
2201      * @param status ICU error code.
2202      * @stable ICU 54
2203      */
2204     static MeasureUnit *createFathom(UErrorCode &status);
2205 
2206     /**
2207      * Returns by value, unit of length: fathom.
2208      * Also see {@link #createFathom()}.
2209      * @stable ICU 64
2210      */
2211     static MeasureUnit getFathom();
2212 
2213     /**
2214      * Returns by pointer, unit of length: foot.
2215      * Caller owns returned value and must free it.
2216      * Also see {@link #getFoot()}.
2217      * @param status ICU error code.
2218      * @stable ICU 53
2219      */
2220     static MeasureUnit *createFoot(UErrorCode &status);
2221 
2222     /**
2223      * Returns by value, unit of length: foot.
2224      * Also see {@link #createFoot()}.
2225      * @stable ICU 64
2226      */
2227     static MeasureUnit getFoot();
2228 
2229     /**
2230      * Returns by pointer, unit of length: furlong.
2231      * Caller owns returned value and must free it.
2232      * Also see {@link #getFurlong()}.
2233      * @param status ICU error code.
2234      * @stable ICU 54
2235      */
2236     static MeasureUnit *createFurlong(UErrorCode &status);
2237 
2238     /**
2239      * Returns by value, unit of length: furlong.
2240      * Also see {@link #createFurlong()}.
2241      * @stable ICU 64
2242      */
2243     static MeasureUnit getFurlong();
2244 
2245     /**
2246      * Returns by pointer, unit of length: inch.
2247      * Caller owns returned value and must free it.
2248      * Also see {@link #getInch()}.
2249      * @param status ICU error code.
2250      * @stable ICU 53
2251      */
2252     static MeasureUnit *createInch(UErrorCode &status);
2253 
2254     /**
2255      * Returns by value, unit of length: inch.
2256      * Also see {@link #createInch()}.
2257      * @stable ICU 64
2258      */
2259     static MeasureUnit getInch();
2260 
2261     /**
2262      * Returns by pointer, unit of length: kilometer.
2263      * Caller owns returned value and must free it.
2264      * Also see {@link #getKilometer()}.
2265      * @param status ICU error code.
2266      * @stable ICU 53
2267      */
2268     static MeasureUnit *createKilometer(UErrorCode &status);
2269 
2270     /**
2271      * Returns by value, unit of length: kilometer.
2272      * Also see {@link #createKilometer()}.
2273      * @stable ICU 64
2274      */
2275     static MeasureUnit getKilometer();
2276 
2277     /**
2278      * Returns by pointer, unit of length: light-year.
2279      * Caller owns returned value and must free it.
2280      * Also see {@link #getLightYear()}.
2281      * @param status ICU error code.
2282      * @stable ICU 53
2283      */
2284     static MeasureUnit *createLightYear(UErrorCode &status);
2285 
2286     /**
2287      * Returns by value, unit of length: light-year.
2288      * Also see {@link #createLightYear()}.
2289      * @stable ICU 64
2290      */
2291     static MeasureUnit getLightYear();
2292 
2293     /**
2294      * Returns by pointer, unit of length: meter.
2295      * Caller owns returned value and must free it.
2296      * Also see {@link #getMeter()}.
2297      * @param status ICU error code.
2298      * @stable ICU 53
2299      */
2300     static MeasureUnit *createMeter(UErrorCode &status);
2301 
2302     /**
2303      * Returns by value, unit of length: meter.
2304      * Also see {@link #createMeter()}.
2305      * @stable ICU 64
2306      */
2307     static MeasureUnit getMeter();
2308 
2309     /**
2310      * Returns by pointer, unit of length: micrometer.
2311      * Caller owns returned value and must free it.
2312      * Also see {@link #getMicrometer()}.
2313      * @param status ICU error code.
2314      * @stable ICU 54
2315      */
2316     static MeasureUnit *createMicrometer(UErrorCode &status);
2317 
2318     /**
2319      * Returns by value, unit of length: micrometer.
2320      * Also see {@link #createMicrometer()}.
2321      * @stable ICU 64
2322      */
2323     static MeasureUnit getMicrometer();
2324 
2325     /**
2326      * Returns by pointer, unit of length: mile.
2327      * Caller owns returned value and must free it.
2328      * Also see {@link #getMile()}.
2329      * @param status ICU error code.
2330      * @stable ICU 53
2331      */
2332     static MeasureUnit *createMile(UErrorCode &status);
2333 
2334     /**
2335      * Returns by value, unit of length: mile.
2336      * Also see {@link #createMile()}.
2337      * @stable ICU 64
2338      */
2339     static MeasureUnit getMile();
2340 
2341     /**
2342      * Returns by pointer, unit of length: mile-scandinavian.
2343      * Caller owns returned value and must free it.
2344      * Also see {@link #getMileScandinavian()}.
2345      * @param status ICU error code.
2346      * @stable ICU 56
2347      */
2348     static MeasureUnit *createMileScandinavian(UErrorCode &status);
2349 
2350     /**
2351      * Returns by value, unit of length: mile-scandinavian.
2352      * Also see {@link #createMileScandinavian()}.
2353      * @stable ICU 64
2354      */
2355     static MeasureUnit getMileScandinavian();
2356 
2357     /**
2358      * Returns by pointer, unit of length: millimeter.
2359      * Caller owns returned value and must free it.
2360      * Also see {@link #getMillimeter()}.
2361      * @param status ICU error code.
2362      * @stable ICU 53
2363      */
2364     static MeasureUnit *createMillimeter(UErrorCode &status);
2365 
2366     /**
2367      * Returns by value, unit of length: millimeter.
2368      * Also see {@link #createMillimeter()}.
2369      * @stable ICU 64
2370      */
2371     static MeasureUnit getMillimeter();
2372 
2373     /**
2374      * Returns by pointer, unit of length: nanometer.
2375      * Caller owns returned value and must free it.
2376      * Also see {@link #getNanometer()}.
2377      * @param status ICU error code.
2378      * @stable ICU 54
2379      */
2380     static MeasureUnit *createNanometer(UErrorCode &status);
2381 
2382     /**
2383      * Returns by value, unit of length: nanometer.
2384      * Also see {@link #createNanometer()}.
2385      * @stable ICU 64
2386      */
2387     static MeasureUnit getNanometer();
2388 
2389     /**
2390      * Returns by pointer, unit of length: nautical-mile.
2391      * Caller owns returned value and must free it.
2392      * Also see {@link #getNauticalMile()}.
2393      * @param status ICU error code.
2394      * @stable ICU 54
2395      */
2396     static MeasureUnit *createNauticalMile(UErrorCode &status);
2397 
2398     /**
2399      * Returns by value, unit of length: nautical-mile.
2400      * Also see {@link #createNauticalMile()}.
2401      * @stable ICU 64
2402      */
2403     static MeasureUnit getNauticalMile();
2404 
2405     /**
2406      * Returns by pointer, unit of length: parsec.
2407      * Caller owns returned value and must free it.
2408      * Also see {@link #getParsec()}.
2409      * @param status ICU error code.
2410      * @stable ICU 54
2411      */
2412     static MeasureUnit *createParsec(UErrorCode &status);
2413 
2414     /**
2415      * Returns by value, unit of length: parsec.
2416      * Also see {@link #createParsec()}.
2417      * @stable ICU 64
2418      */
2419     static MeasureUnit getParsec();
2420 
2421     /**
2422      * Returns by pointer, unit of length: picometer.
2423      * Caller owns returned value and must free it.
2424      * Also see {@link #getPicometer()}.
2425      * @param status ICU error code.
2426      * @stable ICU 53
2427      */
2428     static MeasureUnit *createPicometer(UErrorCode &status);
2429 
2430     /**
2431      * Returns by value, unit of length: picometer.
2432      * Also see {@link #createPicometer()}.
2433      * @stable ICU 64
2434      */
2435     static MeasureUnit getPicometer();
2436 
2437     /**
2438      * Returns by pointer, unit of length: point.
2439      * Caller owns returned value and must free it.
2440      * Also see {@link #getPoint()}.
2441      * @param status ICU error code.
2442      * @stable ICU 59
2443      */
2444     static MeasureUnit *createPoint(UErrorCode &status);
2445 
2446     /**
2447      * Returns by value, unit of length: point.
2448      * Also see {@link #createPoint()}.
2449      * @stable ICU 64
2450      */
2451     static MeasureUnit getPoint();
2452 
2453     /**
2454      * Returns by pointer, unit of length: solar-radius.
2455      * Caller owns returned value and must free it.
2456      * Also see {@link #getSolarRadius()}.
2457      * @param status ICU error code.
2458      * @stable ICU 64
2459      */
2460     static MeasureUnit *createSolarRadius(UErrorCode &status);
2461 
2462     /**
2463      * Returns by value, unit of length: solar-radius.
2464      * Also see {@link #createSolarRadius()}.
2465      * @stable ICU 64
2466      */
2467     static MeasureUnit getSolarRadius();
2468 
2469     /**
2470      * Returns by pointer, unit of length: yard.
2471      * Caller owns returned value and must free it.
2472      * Also see {@link #getYard()}.
2473      * @param status ICU error code.
2474      * @stable ICU 53
2475      */
2476     static MeasureUnit *createYard(UErrorCode &status);
2477 
2478     /**
2479      * Returns by value, unit of length: yard.
2480      * Also see {@link #createYard()}.
2481      * @stable ICU 64
2482      */
2483     static MeasureUnit getYard();
2484 
2485     /**
2486      * Returns by pointer, unit of light: candela.
2487      * Caller owns returned value and must free it.
2488      * Also see {@link #getCandela()}.
2489      * @param status ICU error code.
2490      * @stable ICU 68
2491      */
2492     static MeasureUnit *createCandela(UErrorCode &status);
2493 
2494     /**
2495      * Returns by value, unit of light: candela.
2496      * Also see {@link #createCandela()}.
2497      * @stable ICU 68
2498      */
2499     static MeasureUnit getCandela();
2500 
2501     /**
2502      * Returns by pointer, unit of light: lumen.
2503      * Caller owns returned value and must free it.
2504      * Also see {@link #getLumen()}.
2505      * @param status ICU error code.
2506      * @stable ICU 68
2507      */
2508     static MeasureUnit *createLumen(UErrorCode &status);
2509 
2510     /**
2511      * Returns by value, unit of light: lumen.
2512      * Also see {@link #createLumen()}.
2513      * @stable ICU 68
2514      */
2515     static MeasureUnit getLumen();
2516 
2517     /**
2518      * Returns by pointer, unit of light: lux.
2519      * Caller owns returned value and must free it.
2520      * Also see {@link #getLux()}.
2521      * @param status ICU error code.
2522      * @stable ICU 54
2523      */
2524     static MeasureUnit *createLux(UErrorCode &status);
2525 
2526     /**
2527      * Returns by value, unit of light: lux.
2528      * Also see {@link #createLux()}.
2529      * @stable ICU 64
2530      */
2531     static MeasureUnit getLux();
2532 
2533     /**
2534      * Returns by pointer, unit of light: solar-luminosity.
2535      * Caller owns returned value and must free it.
2536      * Also see {@link #getSolarLuminosity()}.
2537      * @param status ICU error code.
2538      * @stable ICU 64
2539      */
2540     static MeasureUnit *createSolarLuminosity(UErrorCode &status);
2541 
2542     /**
2543      * Returns by value, unit of light: solar-luminosity.
2544      * Also see {@link #createSolarLuminosity()}.
2545      * @stable ICU 64
2546      */
2547     static MeasureUnit getSolarLuminosity();
2548 
2549     /**
2550      * Returns by pointer, unit of mass: carat.
2551      * Caller owns returned value and must free it.
2552      * Also see {@link #getCarat()}.
2553      * @param status ICU error code.
2554      * @stable ICU 54
2555      */
2556     static MeasureUnit *createCarat(UErrorCode &status);
2557 
2558     /**
2559      * Returns by value, unit of mass: carat.
2560      * Also see {@link #createCarat()}.
2561      * @stable ICU 64
2562      */
2563     static MeasureUnit getCarat();
2564 
2565     /**
2566      * Returns by pointer, unit of mass: dalton.
2567      * Caller owns returned value and must free it.
2568      * Also see {@link #getDalton()}.
2569      * @param status ICU error code.
2570      * @stable ICU 64
2571      */
2572     static MeasureUnit *createDalton(UErrorCode &status);
2573 
2574     /**
2575      * Returns by value, unit of mass: dalton.
2576      * Also see {@link #createDalton()}.
2577      * @stable ICU 64
2578      */
2579     static MeasureUnit getDalton();
2580 
2581     /**
2582      * Returns by pointer, unit of mass: earth-mass.
2583      * Caller owns returned value and must free it.
2584      * Also see {@link #getEarthMass()}.
2585      * @param status ICU error code.
2586      * @stable ICU 64
2587      */
2588     static MeasureUnit *createEarthMass(UErrorCode &status);
2589 
2590     /**
2591      * Returns by value, unit of mass: earth-mass.
2592      * Also see {@link #createEarthMass()}.
2593      * @stable ICU 64
2594      */
2595     static MeasureUnit getEarthMass();
2596 
2597     /**
2598      * Returns by pointer, unit of mass: grain.
2599      * Caller owns returned value and must free it.
2600      * Also see {@link #getGrain()}.
2601      * @param status ICU error code.
2602      * @stable ICU 68
2603      */
2604     static MeasureUnit *createGrain(UErrorCode &status);
2605 
2606     /**
2607      * Returns by value, unit of mass: grain.
2608      * Also see {@link #createGrain()}.
2609      * @stable ICU 68
2610      */
2611     static MeasureUnit getGrain();
2612 
2613     /**
2614      * Returns by pointer, unit of mass: gram.
2615      * Caller owns returned value and must free it.
2616      * Also see {@link #getGram()}.
2617      * @param status ICU error code.
2618      * @stable ICU 53
2619      */
2620     static MeasureUnit *createGram(UErrorCode &status);
2621 
2622     /**
2623      * Returns by value, unit of mass: gram.
2624      * Also see {@link #createGram()}.
2625      * @stable ICU 64
2626      */
2627     static MeasureUnit getGram();
2628 
2629     /**
2630      * Returns by pointer, unit of mass: kilogram.
2631      * Caller owns returned value and must free it.
2632      * Also see {@link #getKilogram()}.
2633      * @param status ICU error code.
2634      * @stable ICU 53
2635      */
2636     static MeasureUnit *createKilogram(UErrorCode &status);
2637 
2638     /**
2639      * Returns by value, unit of mass: kilogram.
2640      * Also see {@link #createKilogram()}.
2641      * @stable ICU 64
2642      */
2643     static MeasureUnit getKilogram();
2644 
2645     /**
2646      * Returns by pointer, unit of mass: microgram.
2647      * Caller owns returned value and must free it.
2648      * Also see {@link #getMicrogram()}.
2649      * @param status ICU error code.
2650      * @stable ICU 54
2651      */
2652     static MeasureUnit *createMicrogram(UErrorCode &status);
2653 
2654     /**
2655      * Returns by value, unit of mass: microgram.
2656      * Also see {@link #createMicrogram()}.
2657      * @stable ICU 64
2658      */
2659     static MeasureUnit getMicrogram();
2660 
2661     /**
2662      * Returns by pointer, unit of mass: milligram.
2663      * Caller owns returned value and must free it.
2664      * Also see {@link #getMilligram()}.
2665      * @param status ICU error code.
2666      * @stable ICU 54
2667      */
2668     static MeasureUnit *createMilligram(UErrorCode &status);
2669 
2670     /**
2671      * Returns by value, unit of mass: milligram.
2672      * Also see {@link #createMilligram()}.
2673      * @stable ICU 64
2674      */
2675     static MeasureUnit getMilligram();
2676 
2677     /**
2678      * Returns by pointer, unit of mass: ounce.
2679      * Caller owns returned value and must free it.
2680      * Also see {@link #getOunce()}.
2681      * @param status ICU error code.
2682      * @stable ICU 53
2683      */
2684     static MeasureUnit *createOunce(UErrorCode &status);
2685 
2686     /**
2687      * Returns by value, unit of mass: ounce.
2688      * Also see {@link #createOunce()}.
2689      * @stable ICU 64
2690      */
2691     static MeasureUnit getOunce();
2692 
2693     /**
2694      * Returns by pointer, unit of mass: ounce-troy.
2695      * Caller owns returned value and must free it.
2696      * Also see {@link #getOunceTroy()}.
2697      * @param status ICU error code.
2698      * @stable ICU 54
2699      */
2700     static MeasureUnit *createOunceTroy(UErrorCode &status);
2701 
2702     /**
2703      * Returns by value, unit of mass: ounce-troy.
2704      * Also see {@link #createOunceTroy()}.
2705      * @stable ICU 64
2706      */
2707     static MeasureUnit getOunceTroy();
2708 
2709     /**
2710      * Returns by pointer, unit of mass: pound.
2711      * Caller owns returned value and must free it.
2712      * Also see {@link #getPound()}.
2713      * @param status ICU error code.
2714      * @stable ICU 53
2715      */
2716     static MeasureUnit *createPound(UErrorCode &status);
2717 
2718     /**
2719      * Returns by value, unit of mass: pound.
2720      * Also see {@link #createPound()}.
2721      * @stable ICU 64
2722      */
2723     static MeasureUnit getPound();
2724 
2725     /**
2726      * Returns by pointer, unit of mass: solar-mass.
2727      * Caller owns returned value and must free it.
2728      * Also see {@link #getSolarMass()}.
2729      * @param status ICU error code.
2730      * @stable ICU 64
2731      */
2732     static MeasureUnit *createSolarMass(UErrorCode &status);
2733 
2734     /**
2735      * Returns by value, unit of mass: solar-mass.
2736      * Also see {@link #createSolarMass()}.
2737      * @stable ICU 64
2738      */
2739     static MeasureUnit getSolarMass();
2740 
2741     /**
2742      * Returns by pointer, unit of mass: stone.
2743      * Caller owns returned value and must free it.
2744      * Also see {@link #getStone()}.
2745      * @param status ICU error code.
2746      * @stable ICU 54
2747      */
2748     static MeasureUnit *createStone(UErrorCode &status);
2749 
2750     /**
2751      * Returns by value, unit of mass: stone.
2752      * Also see {@link #createStone()}.
2753      * @stable ICU 64
2754      */
2755     static MeasureUnit getStone();
2756 
2757     /**
2758      * Returns by pointer, unit of mass: ton.
2759      * Caller owns returned value and must free it.
2760      * Also see {@link #getTon()}.
2761      * @param status ICU error code.
2762      * @stable ICU 54
2763      */
2764     static MeasureUnit *createTon(UErrorCode &status);
2765 
2766     /**
2767      * Returns by value, unit of mass: ton.
2768      * Also see {@link #createTon()}.
2769      * @stable ICU 64
2770      */
2771     static MeasureUnit getTon();
2772 
2773     /**
2774      * Returns by pointer, unit of mass: tonne.
2775      * Caller owns returned value and must free it.
2776      * Also see {@link #getTonne()}.
2777      * @param status ICU error code.
2778      * @stable ICU 72
2779      */
2780     static MeasureUnit *createTonne(UErrorCode &status);
2781 
2782     /**
2783      * Returns by value, unit of mass: tonne.
2784      * Also see {@link #createTonne()}.
2785      * @stable ICU 72
2786      */
2787     static MeasureUnit getTonne();
2788 
2789     /**
2790      * Returns by pointer, unit of mass: metric-ton
2791      * (renamed to tonne in CLDR 42 / ICU 72).
2792      * Caller owns returned value and must free it.
2793      * Note: In ICU 74 this will be deprecated in favor of
2794      * createTonne(), which is currently draft but will
2795      * become stable in ICU 74, and which uses the preferred naming.
2796      * Also see {@link #getMetricTon()} and {@link #createTonne()}.
2797      * @param status ICU error code.
2798      * @stable ICU 54
2799      */
2800     static MeasureUnit *createMetricTon(UErrorCode &status);
2801 
2802     /**
2803      * Returns by value, unit of mass: metric-ton
2804      * (renamed to tonne in CLDR 42 / ICU 72).
2805      * Note: In ICU 74 this will be deprecated in favor of
2806      * getTonne(), which is currently draft but will
2807      * become stable in ICU 74, and which uses the preferred naming.
2808      * Also see {@link #createMetricTon()} and {@link #getTonne()}.
2809      * @stable ICU 64
2810      */
2811     static MeasureUnit getMetricTon();
2812 
2813     /**
2814      * Returns by pointer, unit of power: gigawatt.
2815      * Caller owns returned value and must free it.
2816      * Also see {@link #getGigawatt()}.
2817      * @param status ICU error code.
2818      * @stable ICU 54
2819      */
2820     static MeasureUnit *createGigawatt(UErrorCode &status);
2821 
2822     /**
2823      * Returns by value, unit of power: gigawatt.
2824      * Also see {@link #createGigawatt()}.
2825      * @stable ICU 64
2826      */
2827     static MeasureUnit getGigawatt();
2828 
2829     /**
2830      * Returns by pointer, unit of power: horsepower.
2831      * Caller owns returned value and must free it.
2832      * Also see {@link #getHorsepower()}.
2833      * @param status ICU error code.
2834      * @stable ICU 53
2835      */
2836     static MeasureUnit *createHorsepower(UErrorCode &status);
2837 
2838     /**
2839      * Returns by value, unit of power: horsepower.
2840      * Also see {@link #createHorsepower()}.
2841      * @stable ICU 64
2842      */
2843     static MeasureUnit getHorsepower();
2844 
2845     /**
2846      * Returns by pointer, unit of power: kilowatt.
2847      * Caller owns returned value and must free it.
2848      * Also see {@link #getKilowatt()}.
2849      * @param status ICU error code.
2850      * @stable ICU 53
2851      */
2852     static MeasureUnit *createKilowatt(UErrorCode &status);
2853 
2854     /**
2855      * Returns by value, unit of power: kilowatt.
2856      * Also see {@link #createKilowatt()}.
2857      * @stable ICU 64
2858      */
2859     static MeasureUnit getKilowatt();
2860 
2861     /**
2862      * Returns by pointer, unit of power: megawatt.
2863      * Caller owns returned value and must free it.
2864      * Also see {@link #getMegawatt()}.
2865      * @param status ICU error code.
2866      * @stable ICU 54
2867      */
2868     static MeasureUnit *createMegawatt(UErrorCode &status);
2869 
2870     /**
2871      * Returns by value, unit of power: megawatt.
2872      * Also see {@link #createMegawatt()}.
2873      * @stable ICU 64
2874      */
2875     static MeasureUnit getMegawatt();
2876 
2877     /**
2878      * Returns by pointer, unit of power: milliwatt.
2879      * Caller owns returned value and must free it.
2880      * Also see {@link #getMilliwatt()}.
2881      * @param status ICU error code.
2882      * @stable ICU 54
2883      */
2884     static MeasureUnit *createMilliwatt(UErrorCode &status);
2885 
2886     /**
2887      * Returns by value, unit of power: milliwatt.
2888      * Also see {@link #createMilliwatt()}.
2889      * @stable ICU 64
2890      */
2891     static MeasureUnit getMilliwatt();
2892 
2893     /**
2894      * Returns by pointer, unit of power: watt.
2895      * Caller owns returned value and must free it.
2896      * Also see {@link #getWatt()}.
2897      * @param status ICU error code.
2898      * @stable ICU 53
2899      */
2900     static MeasureUnit *createWatt(UErrorCode &status);
2901 
2902     /**
2903      * Returns by value, unit of power: watt.
2904      * Also see {@link #createWatt()}.
2905      * @stable ICU 64
2906      */
2907     static MeasureUnit getWatt();
2908 
2909     /**
2910      * Returns by pointer, unit of pressure: atmosphere.
2911      * Caller owns returned value and must free it.
2912      * Also see {@link #getAtmosphere()}.
2913      * @param status ICU error code.
2914      * @stable ICU 63
2915      */
2916     static MeasureUnit *createAtmosphere(UErrorCode &status);
2917 
2918     /**
2919      * Returns by value, unit of pressure: atmosphere.
2920      * Also see {@link #createAtmosphere()}.
2921      * @stable ICU 64
2922      */
2923     static MeasureUnit getAtmosphere();
2924 
2925     /**
2926      * Returns by pointer, unit of pressure: bar.
2927      * Caller owns returned value and must free it.
2928      * Also see {@link #getBar()}.
2929      * @param status ICU error code.
2930      * @stable ICU 65
2931      */
2932     static MeasureUnit *createBar(UErrorCode &status);
2933 
2934     /**
2935      * Returns by value, unit of pressure: bar.
2936      * Also see {@link #createBar()}.
2937      * @stable ICU 65
2938      */
2939     static MeasureUnit getBar();
2940 
2941     /**
2942      * Returns by pointer, unit of pressure: gasoline-energy-density.
2943      * Caller owns returned value and must free it.
2944      * Also see {@link #getGasolineEnergyDensity()}.
2945      * @param status ICU error code.
2946      * @stable ICU 74
2947      */
2948     static MeasureUnit *createGasolineEnergyDensity(UErrorCode &status);
2949 
2950     /**
2951      * Returns by value, unit of pressure: gasoline-energy-density.
2952      * Also see {@link #createGasolineEnergyDensity()}.
2953      * @stable ICU 74
2954      */
2955     static MeasureUnit getGasolineEnergyDensity();
2956 
2957     /**
2958      * Returns by pointer, unit of pressure: hectopascal.
2959      * Caller owns returned value and must free it.
2960      * Also see {@link #getHectopascal()}.
2961      * @param status ICU error code.
2962      * @stable ICU 53
2963      */
2964     static MeasureUnit *createHectopascal(UErrorCode &status);
2965 
2966     /**
2967      * Returns by value, unit of pressure: hectopascal.
2968      * Also see {@link #createHectopascal()}.
2969      * @stable ICU 64
2970      */
2971     static MeasureUnit getHectopascal();
2972 
2973     /**
2974      * Returns by pointer, unit of pressure: inch-ofhg.
2975      * Caller owns returned value and must free it.
2976      * Also see {@link #getInchHg()}.
2977      * @param status ICU error code.
2978      * @stable ICU 53
2979      */
2980     static MeasureUnit *createInchHg(UErrorCode &status);
2981 
2982     /**
2983      * Returns by value, unit of pressure: inch-ofhg.
2984      * Also see {@link #createInchHg()}.
2985      * @stable ICU 64
2986      */
2987     static MeasureUnit getInchHg();
2988 
2989     /**
2990      * Returns by pointer, unit of pressure: kilopascal.
2991      * Caller owns returned value and must free it.
2992      * Also see {@link #getKilopascal()}.
2993      * @param status ICU error code.
2994      * @stable ICU 64
2995      */
2996     static MeasureUnit *createKilopascal(UErrorCode &status);
2997 
2998     /**
2999      * Returns by value, unit of pressure: kilopascal.
3000      * Also see {@link #createKilopascal()}.
3001      * @stable ICU 64
3002      */
3003     static MeasureUnit getKilopascal();
3004 
3005     /**
3006      * Returns by pointer, unit of pressure: megapascal.
3007      * Caller owns returned value and must free it.
3008      * Also see {@link #getMegapascal()}.
3009      * @param status ICU error code.
3010      * @stable ICU 64
3011      */
3012     static MeasureUnit *createMegapascal(UErrorCode &status);
3013 
3014     /**
3015      * Returns by value, unit of pressure: megapascal.
3016      * Also see {@link #createMegapascal()}.
3017      * @stable ICU 64
3018      */
3019     static MeasureUnit getMegapascal();
3020 
3021     /**
3022      * Returns by pointer, unit of pressure: millibar.
3023      * Caller owns returned value and must free it.
3024      * Also see {@link #getMillibar()}.
3025      * @param status ICU error code.
3026      * @stable ICU 53
3027      */
3028     static MeasureUnit *createMillibar(UErrorCode &status);
3029 
3030     /**
3031      * Returns by value, unit of pressure: millibar.
3032      * Also see {@link #createMillibar()}.
3033      * @stable ICU 64
3034      */
3035     static MeasureUnit getMillibar();
3036 
3037     /**
3038      * Returns by pointer, unit of pressure: millimeter-ofhg.
3039      * Caller owns returned value and must free it.
3040      * Also see {@link #getMillimeterOfMercury()}.
3041      * @param status ICU error code.
3042      * @stable ICU 54
3043      */
3044     static MeasureUnit *createMillimeterOfMercury(UErrorCode &status);
3045 
3046     /**
3047      * Returns by value, unit of pressure: millimeter-ofhg.
3048      * Also see {@link #createMillimeterOfMercury()}.
3049      * @stable ICU 64
3050      */
3051     static MeasureUnit getMillimeterOfMercury();
3052 
3053     /**
3054      * Returns by pointer, unit of pressure: pascal.
3055      * Caller owns returned value and must free it.
3056      * Also see {@link #getPascal()}.
3057      * @param status ICU error code.
3058      * @stable ICU 65
3059      */
3060     static MeasureUnit *createPascal(UErrorCode &status);
3061 
3062     /**
3063      * Returns by value, unit of pressure: pascal.
3064      * Also see {@link #createPascal()}.
3065      * @stable ICU 65
3066      */
3067     static MeasureUnit getPascal();
3068 
3069     /**
3070      * Returns by pointer, unit of pressure: pound-force-per-square-inch.
3071      * Caller owns returned value and must free it.
3072      * Also see {@link #getPoundPerSquareInch()}.
3073      * @param status ICU error code.
3074      * @stable ICU 54
3075      */
3076     static MeasureUnit *createPoundPerSquareInch(UErrorCode &status);
3077 
3078     /**
3079      * Returns by value, unit of pressure: pound-force-per-square-inch.
3080      * Also see {@link #createPoundPerSquareInch()}.
3081      * @stable ICU 64
3082      */
3083     static MeasureUnit getPoundPerSquareInch();
3084 
3085     /**
3086      * Returns by pointer, unit of speed: beaufort.
3087      * Caller owns returned value and must free it.
3088      * Also see {@link #getBeaufort()}.
3089      * @param status ICU error code.
3090      * @stable ICU 73
3091      */
3092     static MeasureUnit *createBeaufort(UErrorCode &status);
3093 
3094     /**
3095      * Returns by value, unit of speed: beaufort.
3096      * Also see {@link #createBeaufort()}.
3097      * @stable ICU 73
3098      */
3099     static MeasureUnit getBeaufort();
3100 
3101     /**
3102      * Returns by pointer, unit of speed: kilometer-per-hour.
3103      * Caller owns returned value and must free it.
3104      * Also see {@link #getKilometerPerHour()}.
3105      * @param status ICU error code.
3106      * @stable ICU 53
3107      */
3108     static MeasureUnit *createKilometerPerHour(UErrorCode &status);
3109 
3110     /**
3111      * Returns by value, unit of speed: kilometer-per-hour.
3112      * Also see {@link #createKilometerPerHour()}.
3113      * @stable ICU 64
3114      */
3115     static MeasureUnit getKilometerPerHour();
3116 
3117     /**
3118      * Returns by pointer, unit of speed: knot.
3119      * Caller owns returned value and must free it.
3120      * Also see {@link #getKnot()}.
3121      * @param status ICU error code.
3122      * @stable ICU 56
3123      */
3124     static MeasureUnit *createKnot(UErrorCode &status);
3125 
3126     /**
3127      * Returns by value, unit of speed: knot.
3128      * Also see {@link #createKnot()}.
3129      * @stable ICU 64
3130      */
3131     static MeasureUnit getKnot();
3132 
3133 #ifndef U_HIDE_DRAFT_API
3134     /**
3135      * Returns by pointer, unit of speed: light-speed.
3136      * Caller owns returned value and must free it.
3137      * Also see {@link #getLightSpeed()}.
3138      * @param status ICU error code.
3139      * @draft ICU 76
3140      */
3141     static MeasureUnit *createLightSpeed(UErrorCode &status);
3142 
3143     /**
3144      * Returns by value, unit of speed: light-speed.
3145      * Also see {@link #createLightSpeed()}.
3146      * @draft ICU 76
3147      */
3148     static MeasureUnit getLightSpeed();
3149 #endif /* U_HIDE_DRAFT_API */
3150 
3151     /**
3152      * Returns by pointer, unit of speed: meter-per-second.
3153      * Caller owns returned value and must free it.
3154      * Also see {@link #getMeterPerSecond()}.
3155      * @param status ICU error code.
3156      * @stable ICU 53
3157      */
3158     static MeasureUnit *createMeterPerSecond(UErrorCode &status);
3159 
3160     /**
3161      * Returns by value, unit of speed: meter-per-second.
3162      * Also see {@link #createMeterPerSecond()}.
3163      * @stable ICU 64
3164      */
3165     static MeasureUnit getMeterPerSecond();
3166 
3167     /**
3168      * Returns by pointer, unit of speed: mile-per-hour.
3169      * Caller owns returned value and must free it.
3170      * Also see {@link #getMilePerHour()}.
3171      * @param status ICU error code.
3172      * @stable ICU 53
3173      */
3174     static MeasureUnit *createMilePerHour(UErrorCode &status);
3175 
3176     /**
3177      * Returns by value, unit of speed: mile-per-hour.
3178      * Also see {@link #createMilePerHour()}.
3179      * @stable ICU 64
3180      */
3181     static MeasureUnit getMilePerHour();
3182 
3183     /**
3184      * Returns by pointer, unit of temperature: celsius.
3185      * Caller owns returned value and must free it.
3186      * Also see {@link #getCelsius()}.
3187      * @param status ICU error code.
3188      * @stable ICU 53
3189      */
3190     static MeasureUnit *createCelsius(UErrorCode &status);
3191 
3192     /**
3193      * Returns by value, unit of temperature: celsius.
3194      * Also see {@link #createCelsius()}.
3195      * @stable ICU 64
3196      */
3197     static MeasureUnit getCelsius();
3198 
3199     /**
3200      * Returns by pointer, unit of temperature: fahrenheit.
3201      * Caller owns returned value and must free it.
3202      * Also see {@link #getFahrenheit()}.
3203      * @param status ICU error code.
3204      * @stable ICU 53
3205      */
3206     static MeasureUnit *createFahrenheit(UErrorCode &status);
3207 
3208     /**
3209      * Returns by value, unit of temperature: fahrenheit.
3210      * Also see {@link #createFahrenheit()}.
3211      * @stable ICU 64
3212      */
3213     static MeasureUnit getFahrenheit();
3214 
3215     /**
3216      * Returns by pointer, unit of temperature: generic.
3217      * Caller owns returned value and must free it.
3218      * Also see {@link #getGenericTemperature()}.
3219      * @param status ICU error code.
3220      * @stable ICU 56
3221      */
3222     static MeasureUnit *createGenericTemperature(UErrorCode &status);
3223 
3224     /**
3225      * Returns by value, unit of temperature: generic.
3226      * Also see {@link #createGenericTemperature()}.
3227      * @stable ICU 64
3228      */
3229     static MeasureUnit getGenericTemperature();
3230 
3231     /**
3232      * Returns by pointer, unit of temperature: kelvin.
3233      * Caller owns returned value and must free it.
3234      * Also see {@link #getKelvin()}.
3235      * @param status ICU error code.
3236      * @stable ICU 54
3237      */
3238     static MeasureUnit *createKelvin(UErrorCode &status);
3239 
3240     /**
3241      * Returns by value, unit of temperature: kelvin.
3242      * Also see {@link #createKelvin()}.
3243      * @stable ICU 64
3244      */
3245     static MeasureUnit getKelvin();
3246 
3247     /**
3248      * Returns by pointer, unit of torque: newton-meter.
3249      * Caller owns returned value and must free it.
3250      * Also see {@link #getNewtonMeter()}.
3251      * @param status ICU error code.
3252      * @stable ICU 64
3253      */
3254     static MeasureUnit *createNewtonMeter(UErrorCode &status);
3255 
3256     /**
3257      * Returns by value, unit of torque: newton-meter.
3258      * Also see {@link #createNewtonMeter()}.
3259      * @stable ICU 64
3260      */
3261     static MeasureUnit getNewtonMeter();
3262 
3263     /**
3264      * Returns by pointer, unit of torque: pound-force-foot.
3265      * Caller owns returned value and must free it.
3266      * Also see {@link #getPoundFoot()}.
3267      * @param status ICU error code.
3268      * @stable ICU 64
3269      */
3270     static MeasureUnit *createPoundFoot(UErrorCode &status);
3271 
3272     /**
3273      * Returns by value, unit of torque: pound-force-foot.
3274      * Also see {@link #createPoundFoot()}.
3275      * @stable ICU 64
3276      */
3277     static MeasureUnit getPoundFoot();
3278 
3279     /**
3280      * Returns by pointer, unit of volume: acre-foot.
3281      * Caller owns returned value and must free it.
3282      * Also see {@link #getAcreFoot()}.
3283      * @param status ICU error code.
3284      * @stable ICU 54
3285      */
3286     static MeasureUnit *createAcreFoot(UErrorCode &status);
3287 
3288     /**
3289      * Returns by value, unit of volume: acre-foot.
3290      * Also see {@link #createAcreFoot()}.
3291      * @stable ICU 64
3292      */
3293     static MeasureUnit getAcreFoot();
3294 
3295     /**
3296      * Returns by pointer, unit of volume: barrel.
3297      * Caller owns returned value and must free it.
3298      * Also see {@link #getBarrel()}.
3299      * @param status ICU error code.
3300      * @stable ICU 64
3301      */
3302     static MeasureUnit *createBarrel(UErrorCode &status);
3303 
3304     /**
3305      * Returns by value, unit of volume: barrel.
3306      * Also see {@link #createBarrel()}.
3307      * @stable ICU 64
3308      */
3309     static MeasureUnit getBarrel();
3310 
3311     /**
3312      * Returns by pointer, unit of volume: bushel.
3313      * Caller owns returned value and must free it.
3314      * Also see {@link #getBushel()}.
3315      * @param status ICU error code.
3316      * @stable ICU 54
3317      */
3318     static MeasureUnit *createBushel(UErrorCode &status);
3319 
3320     /**
3321      * Returns by value, unit of volume: bushel.
3322      * Also see {@link #createBushel()}.
3323      * @stable ICU 64
3324      */
3325     static MeasureUnit getBushel();
3326 
3327     /**
3328      * Returns by pointer, unit of volume: centiliter.
3329      * Caller owns returned value and must free it.
3330      * Also see {@link #getCentiliter()}.
3331      * @param status ICU error code.
3332      * @stable ICU 54
3333      */
3334     static MeasureUnit *createCentiliter(UErrorCode &status);
3335 
3336     /**
3337      * Returns by value, unit of volume: centiliter.
3338      * Also see {@link #createCentiliter()}.
3339      * @stable ICU 64
3340      */
3341     static MeasureUnit getCentiliter();
3342 
3343     /**
3344      * Returns by pointer, unit of volume: cubic-centimeter.
3345      * Caller owns returned value and must free it.
3346      * Also see {@link #getCubicCentimeter()}.
3347      * @param status ICU error code.
3348      * @stable ICU 54
3349      */
3350     static MeasureUnit *createCubicCentimeter(UErrorCode &status);
3351 
3352     /**
3353      * Returns by value, unit of volume: cubic-centimeter.
3354      * Also see {@link #createCubicCentimeter()}.
3355      * @stable ICU 64
3356      */
3357     static MeasureUnit getCubicCentimeter();
3358 
3359     /**
3360      * Returns by pointer, unit of volume: cubic-foot.
3361      * Caller owns returned value and must free it.
3362      * Also see {@link #getCubicFoot()}.
3363      * @param status ICU error code.
3364      * @stable ICU 54
3365      */
3366     static MeasureUnit *createCubicFoot(UErrorCode &status);
3367 
3368     /**
3369      * Returns by value, unit of volume: cubic-foot.
3370      * Also see {@link #createCubicFoot()}.
3371      * @stable ICU 64
3372      */
3373     static MeasureUnit getCubicFoot();
3374 
3375     /**
3376      * Returns by pointer, unit of volume: cubic-inch.
3377      * Caller owns returned value and must free it.
3378      * Also see {@link #getCubicInch()}.
3379      * @param status ICU error code.
3380      * @stable ICU 54
3381      */
3382     static MeasureUnit *createCubicInch(UErrorCode &status);
3383 
3384     /**
3385      * Returns by value, unit of volume: cubic-inch.
3386      * Also see {@link #createCubicInch()}.
3387      * @stable ICU 64
3388      */
3389     static MeasureUnit getCubicInch();
3390 
3391     /**
3392      * Returns by pointer, unit of volume: cubic-kilometer.
3393      * Caller owns returned value and must free it.
3394      * Also see {@link #getCubicKilometer()}.
3395      * @param status ICU error code.
3396      * @stable ICU 53
3397      */
3398     static MeasureUnit *createCubicKilometer(UErrorCode &status);
3399 
3400     /**
3401      * Returns by value, unit of volume: cubic-kilometer.
3402      * Also see {@link #createCubicKilometer()}.
3403      * @stable ICU 64
3404      */
3405     static MeasureUnit getCubicKilometer();
3406 
3407     /**
3408      * Returns by pointer, unit of volume: cubic-meter.
3409      * Caller owns returned value and must free it.
3410      * Also see {@link #getCubicMeter()}.
3411      * @param status ICU error code.
3412      * @stable ICU 54
3413      */
3414     static MeasureUnit *createCubicMeter(UErrorCode &status);
3415 
3416     /**
3417      * Returns by value, unit of volume: cubic-meter.
3418      * Also see {@link #createCubicMeter()}.
3419      * @stable ICU 64
3420      */
3421     static MeasureUnit getCubicMeter();
3422 
3423     /**
3424      * Returns by pointer, unit of volume: cubic-mile.
3425      * Caller owns returned value and must free it.
3426      * Also see {@link #getCubicMile()}.
3427      * @param status ICU error code.
3428      * @stable ICU 53
3429      */
3430     static MeasureUnit *createCubicMile(UErrorCode &status);
3431 
3432     /**
3433      * Returns by value, unit of volume: cubic-mile.
3434      * Also see {@link #createCubicMile()}.
3435      * @stable ICU 64
3436      */
3437     static MeasureUnit getCubicMile();
3438 
3439     /**
3440      * Returns by pointer, unit of volume: cubic-yard.
3441      * Caller owns returned value and must free it.
3442      * Also see {@link #getCubicYard()}.
3443      * @param status ICU error code.
3444      * @stable ICU 54
3445      */
3446     static MeasureUnit *createCubicYard(UErrorCode &status);
3447 
3448     /**
3449      * Returns by value, unit of volume: cubic-yard.
3450      * Also see {@link #createCubicYard()}.
3451      * @stable ICU 64
3452      */
3453     static MeasureUnit getCubicYard();
3454 
3455     /**
3456      * Returns by pointer, unit of volume: cup.
3457      * Caller owns returned value and must free it.
3458      * Also see {@link #getCup()}.
3459      * @param status ICU error code.
3460      * @stable ICU 54
3461      */
3462     static MeasureUnit *createCup(UErrorCode &status);
3463 
3464     /**
3465      * Returns by value, unit of volume: cup.
3466      * Also see {@link #createCup()}.
3467      * @stable ICU 64
3468      */
3469     static MeasureUnit getCup();
3470 
3471     /**
3472      * Returns by pointer, unit of volume: cup-metric.
3473      * Caller owns returned value and must free it.
3474      * Also see {@link #getCupMetric()}.
3475      * @param status ICU error code.
3476      * @stable ICU 56
3477      */
3478     static MeasureUnit *createCupMetric(UErrorCode &status);
3479 
3480     /**
3481      * Returns by value, unit of volume: cup-metric.
3482      * Also see {@link #createCupMetric()}.
3483      * @stable ICU 64
3484      */
3485     static MeasureUnit getCupMetric();
3486 
3487     /**
3488      * Returns by pointer, unit of volume: deciliter.
3489      * Caller owns returned value and must free it.
3490      * Also see {@link #getDeciliter()}.
3491      * @param status ICU error code.
3492      * @stable ICU 54
3493      */
3494     static MeasureUnit *createDeciliter(UErrorCode &status);
3495 
3496     /**
3497      * Returns by value, unit of volume: deciliter.
3498      * Also see {@link #createDeciliter()}.
3499      * @stable ICU 64
3500      */
3501     static MeasureUnit getDeciliter();
3502 
3503     /**
3504      * Returns by pointer, unit of volume: dessert-spoon.
3505      * Caller owns returned value and must free it.
3506      * Also see {@link #getDessertSpoon()}.
3507      * @param status ICU error code.
3508      * @stable ICU 68
3509      */
3510     static MeasureUnit *createDessertSpoon(UErrorCode &status);
3511 
3512     /**
3513      * Returns by value, unit of volume: dessert-spoon.
3514      * Also see {@link #createDessertSpoon()}.
3515      * @stable ICU 68
3516      */
3517     static MeasureUnit getDessertSpoon();
3518 
3519     /**
3520      * Returns by pointer, unit of volume: dessert-spoon-imperial.
3521      * Caller owns returned value and must free it.
3522      * Also see {@link #getDessertSpoonImperial()}.
3523      * @param status ICU error code.
3524      * @stable ICU 68
3525      */
3526     static MeasureUnit *createDessertSpoonImperial(UErrorCode &status);
3527 
3528     /**
3529      * Returns by value, unit of volume: dessert-spoon-imperial.
3530      * Also see {@link #createDessertSpoonImperial()}.
3531      * @stable ICU 68
3532      */
3533     static MeasureUnit getDessertSpoonImperial();
3534 
3535     /**
3536      * Returns by pointer, unit of volume: dram.
3537      * Caller owns returned value and must free it.
3538      * Also see {@link #getDram()}.
3539      * @param status ICU error code.
3540      * @stable ICU 68
3541      */
3542     static MeasureUnit *createDram(UErrorCode &status);
3543 
3544     /**
3545      * Returns by value, unit of volume: dram.
3546      * Also see {@link #createDram()}.
3547      * @stable ICU 68
3548      */
3549     static MeasureUnit getDram();
3550 
3551     /**
3552      * Returns by pointer, unit of volume: drop.
3553      * Caller owns returned value and must free it.
3554      * Also see {@link #getDrop()}.
3555      * @param status ICU error code.
3556      * @stable ICU 68
3557      */
3558     static MeasureUnit *createDrop(UErrorCode &status);
3559 
3560     /**
3561      * Returns by value, unit of volume: drop.
3562      * Also see {@link #createDrop()}.
3563      * @stable ICU 68
3564      */
3565     static MeasureUnit getDrop();
3566 
3567     /**
3568      * Returns by pointer, unit of volume: fluid-ounce.
3569      * Caller owns returned value and must free it.
3570      * Also see {@link #getFluidOunce()}.
3571      * @param status ICU error code.
3572      * @stable ICU 54
3573      */
3574     static MeasureUnit *createFluidOunce(UErrorCode &status);
3575 
3576     /**
3577      * Returns by value, unit of volume: fluid-ounce.
3578      * Also see {@link #createFluidOunce()}.
3579      * @stable ICU 64
3580      */
3581     static MeasureUnit getFluidOunce();
3582 
3583     /**
3584      * Returns by pointer, unit of volume: fluid-ounce-imperial.
3585      * Caller owns returned value and must free it.
3586      * Also see {@link #getFluidOunceImperial()}.
3587      * @param status ICU error code.
3588      * @stable ICU 64
3589      */
3590     static MeasureUnit *createFluidOunceImperial(UErrorCode &status);
3591 
3592     /**
3593      * Returns by value, unit of volume: fluid-ounce-imperial.
3594      * Also see {@link #createFluidOunceImperial()}.
3595      * @stable ICU 64
3596      */
3597     static MeasureUnit getFluidOunceImperial();
3598 
3599     /**
3600      * Returns by pointer, unit of volume: gallon.
3601      * Caller owns returned value and must free it.
3602      * Also see {@link #getGallon()}.
3603      * @param status ICU error code.
3604      * @stable ICU 54
3605      */
3606     static MeasureUnit *createGallon(UErrorCode &status);
3607 
3608     /**
3609      * Returns by value, unit of volume: gallon.
3610      * Also see {@link #createGallon()}.
3611      * @stable ICU 64
3612      */
3613     static MeasureUnit getGallon();
3614 
3615     /**
3616      * Returns by pointer, unit of volume: gallon-imperial.
3617      * Caller owns returned value and must free it.
3618      * Also see {@link #getGallonImperial()}.
3619      * @param status ICU error code.
3620      * @stable ICU 57
3621      */
3622     static MeasureUnit *createGallonImperial(UErrorCode &status);
3623 
3624     /**
3625      * Returns by value, unit of volume: gallon-imperial.
3626      * Also see {@link #createGallonImperial()}.
3627      * @stable ICU 64
3628      */
3629     static MeasureUnit getGallonImperial();
3630 
3631     /**
3632      * Returns by pointer, unit of volume: hectoliter.
3633      * Caller owns returned value and must free it.
3634      * Also see {@link #getHectoliter()}.
3635      * @param status ICU error code.
3636      * @stable ICU 54
3637      */
3638     static MeasureUnit *createHectoliter(UErrorCode &status);
3639 
3640     /**
3641      * Returns by value, unit of volume: hectoliter.
3642      * Also see {@link #createHectoliter()}.
3643      * @stable ICU 64
3644      */
3645     static MeasureUnit getHectoliter();
3646 
3647     /**
3648      * Returns by pointer, unit of volume: jigger.
3649      * Caller owns returned value and must free it.
3650      * Also see {@link #getJigger()}.
3651      * @param status ICU error code.
3652      * @stable ICU 68
3653      */
3654     static MeasureUnit *createJigger(UErrorCode &status);
3655 
3656     /**
3657      * Returns by value, unit of volume: jigger.
3658      * Also see {@link #createJigger()}.
3659      * @stable ICU 68
3660      */
3661     static MeasureUnit getJigger();
3662 
3663     /**
3664      * Returns by pointer, unit of volume: liter.
3665      * Caller owns returned value and must free it.
3666      * Also see {@link #getLiter()}.
3667      * @param status ICU error code.
3668      * @stable ICU 53
3669      */
3670     static MeasureUnit *createLiter(UErrorCode &status);
3671 
3672     /**
3673      * Returns by value, unit of volume: liter.
3674      * Also see {@link #createLiter()}.
3675      * @stable ICU 64
3676      */
3677     static MeasureUnit getLiter();
3678 
3679     /**
3680      * Returns by pointer, unit of volume: megaliter.
3681      * Caller owns returned value and must free it.
3682      * Also see {@link #getMegaliter()}.
3683      * @param status ICU error code.
3684      * @stable ICU 54
3685      */
3686     static MeasureUnit *createMegaliter(UErrorCode &status);
3687 
3688     /**
3689      * Returns by value, unit of volume: megaliter.
3690      * Also see {@link #createMegaliter()}.
3691      * @stable ICU 64
3692      */
3693     static MeasureUnit getMegaliter();
3694 
3695     /**
3696      * Returns by pointer, unit of volume: milliliter.
3697      * Caller owns returned value and must free it.
3698      * Also see {@link #getMilliliter()}.
3699      * @param status ICU error code.
3700      * @stable ICU 54
3701      */
3702     static MeasureUnit *createMilliliter(UErrorCode &status);
3703 
3704     /**
3705      * Returns by value, unit of volume: milliliter.
3706      * Also see {@link #createMilliliter()}.
3707      * @stable ICU 64
3708      */
3709     static MeasureUnit getMilliliter();
3710 
3711     /**
3712      * Returns by pointer, unit of volume: pinch.
3713      * Caller owns returned value and must free it.
3714      * Also see {@link #getPinch()}.
3715      * @param status ICU error code.
3716      * @stable ICU 68
3717      */
3718     static MeasureUnit *createPinch(UErrorCode &status);
3719 
3720     /**
3721      * Returns by value, unit of volume: pinch.
3722      * Also see {@link #createPinch()}.
3723      * @stable ICU 68
3724      */
3725     static MeasureUnit getPinch();
3726 
3727     /**
3728      * Returns by pointer, unit of volume: pint.
3729      * Caller owns returned value and must free it.
3730      * Also see {@link #getPint()}.
3731      * @param status ICU error code.
3732      * @stable ICU 54
3733      */
3734     static MeasureUnit *createPint(UErrorCode &status);
3735 
3736     /**
3737      * Returns by value, unit of volume: pint.
3738      * Also see {@link #createPint()}.
3739      * @stable ICU 64
3740      */
3741     static MeasureUnit getPint();
3742 
3743     /**
3744      * Returns by pointer, unit of volume: pint-metric.
3745      * Caller owns returned value and must free it.
3746      * Also see {@link #getPintMetric()}.
3747      * @param status ICU error code.
3748      * @stable ICU 56
3749      */
3750     static MeasureUnit *createPintMetric(UErrorCode &status);
3751 
3752     /**
3753      * Returns by value, unit of volume: pint-metric.
3754      * Also see {@link #createPintMetric()}.
3755      * @stable ICU 64
3756      */
3757     static MeasureUnit getPintMetric();
3758 
3759     /**
3760      * Returns by pointer, unit of volume: quart.
3761      * Caller owns returned value and must free it.
3762      * Also see {@link #getQuart()}.
3763      * @param status ICU error code.
3764      * @stable ICU 54
3765      */
3766     static MeasureUnit *createQuart(UErrorCode &status);
3767 
3768     /**
3769      * Returns by value, unit of volume: quart.
3770      * Also see {@link #createQuart()}.
3771      * @stable ICU 64
3772      */
3773     static MeasureUnit getQuart();
3774 
3775     /**
3776      * Returns by pointer, unit of volume: quart-imperial.
3777      * Caller owns returned value and must free it.
3778      * Also see {@link #getQuartImperial()}.
3779      * @param status ICU error code.
3780      * @stable ICU 68
3781      */
3782     static MeasureUnit *createQuartImperial(UErrorCode &status);
3783 
3784     /**
3785      * Returns by value, unit of volume: quart-imperial.
3786      * Also see {@link #createQuartImperial()}.
3787      * @stable ICU 68
3788      */
3789     static MeasureUnit getQuartImperial();
3790 
3791     /**
3792      * Returns by pointer, unit of volume: tablespoon.
3793      * Caller owns returned value and must free it.
3794      * Also see {@link #getTablespoon()}.
3795      * @param status ICU error code.
3796      * @stable ICU 54
3797      */
3798     static MeasureUnit *createTablespoon(UErrorCode &status);
3799 
3800     /**
3801      * Returns by value, unit of volume: tablespoon.
3802      * Also see {@link #createTablespoon()}.
3803      * @stable ICU 64
3804      */
3805     static MeasureUnit getTablespoon();
3806 
3807     /**
3808      * Returns by pointer, unit of volume: teaspoon.
3809      * Caller owns returned value and must free it.
3810      * Also see {@link #getTeaspoon()}.
3811      * @param status ICU error code.
3812      * @stable ICU 54
3813      */
3814     static MeasureUnit *createTeaspoon(UErrorCode &status);
3815 
3816     /**
3817      * Returns by value, unit of volume: teaspoon.
3818      * Also see {@link #createTeaspoon()}.
3819      * @stable ICU 64
3820      */
3821     static MeasureUnit getTeaspoon();
3822 
3823 // End generated createXXX methods
3824 
3825  protected:
3826 
3827 #ifndef U_HIDE_INTERNAL_API
3828     /**
3829      * For ICU use only.
3830      * @internal
3831      */
3832     void initTime(const char *timeId);
3833 
3834     /**
3835      * For ICU use only.
3836      * @internal
3837      */
3838     void initCurrency(StringPiece isoCurrency);
3839 
3840 #endif  /* U_HIDE_INTERNAL_API */
3841 
3842 private:
3843 
3844     // Used by new draft APIs in ICU 67. If non-null, fImpl is owned by the
3845     // MeasureUnit.
3846     MeasureUnitImpl* fImpl;
3847 
3848     // An index into a static string list in measunit.cpp. If set to -1, fImpl
3849     // is in use instead of fTypeId and fSubTypeId.
3850     int16_t fSubTypeId;
3851     // An index into a static string list in measunit.cpp. If set to -1, fImpl
3852     // is in use instead of fTypeId and fSubTypeId.
3853     int8_t fTypeId;
3854 
3855     MeasureUnit(int32_t typeId, int32_t subTypeId);
3856     MeasureUnit(MeasureUnitImpl&& impl);
3857     void setTo(int32_t typeId, int32_t subTypeId);
3858     static MeasureUnit *create(int typeId, int subTypeId, UErrorCode &status);
3859 
3860     /**
3861      * Sets output's typeId and subTypeId according to subType, if subType is a
3862      * valid/known identifier.
3863      *
3864      * @return Whether subType is known to ICU. If false, output was not
3865      * modified.
3866      */
3867     static bool findBySubType(StringPiece subType, MeasureUnit* output);
3868 
3869     /** Internal version of public API */
3870     LocalArray<MeasureUnit> splitToSingleUnitsImpl(int32_t& outCount, UErrorCode& status) const;
3871 
3872     friend class MeasureUnitImpl;
3873 
3874     // For access to findBySubType
3875     friend class number::impl::LongNameHandler;
3876 };
3877 
3878 // inline impl of @stable ICU 68 method
3879 inline std::pair<LocalArray<MeasureUnit>, int32_t>
3880 MeasureUnit::splitToSingleUnits(UErrorCode& status) const {
3881     int32_t length;
3882     auto array = splitToSingleUnitsImpl(length, status);
3883     return std::make_pair(std::move(array), length);
3884 }
3885 
3886 U_NAMESPACE_END
3887 
3888 #endif // !UNCONFIG_NO_FORMATTING
3889 
3890 #endif /* U_SHOW_CPLUSPLUS_API */
3891 
3892 #endif // __MEASUREUNIT_H__