"Fossies" - the Fresh Open Source Software Archive

Member "icu/source/i18n/unicode/measunit.h" (22 Apr 2020, 97563 Bytes) of package /linux/misc/icu4c-67_1-src.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "measunit.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes reports: 67rc_vs_67_1 or 66_1_vs_67_1.

    1 // © 2016 and later: Unicode, Inc. and others.
    2 // License & terms of use: http://www.unicode.org/copyright.html
    3 /*
    4 **********************************************************************
    5 * Copyright (c) 2004-2016, International Business Machines
    6 * Corporation and others.  All Rights Reserved.
    7 **********************************************************************
    8 * Author: Alan Liu
    9 * Created: April 26, 2004
   10 * Since: ICU 3.0
   11 **********************************************************************
   12 */
   13 #ifndef __MEASUREUNIT_H__
   14 #define __MEASUREUNIT_H__
   15 
   16 #include "unicode/utypes.h"
   17 
   18 #if U_SHOW_CPLUSPLUS_API
   19 
   20 #if !UCONFIG_NO_FORMATTING
   21 
   22 #include "unicode/unistr.h"
   23 #include "unicode/localpointer.h"
   24 
   25 /**
   26  * \file 
   27  * \brief C++ API: A unit for measuring a quantity.
   28  */
   29  
   30 U_NAMESPACE_BEGIN
   31 
   32 class StringEnumeration;
   33 struct MeasureUnitImpl;
   34 
   35 #ifndef U_HIDE_DRAFT_API
   36 /**
   37  * Enumeration for unit complexity. There are three levels:
   38  * 
   39  * - SINGLE: A single unit, optionally with a power and/or SI prefix. Examples: hectare,
   40  *           square-kilometer, kilojoule, per-second.
   41  * - COMPOUND: A unit composed of the product of multiple single units. Examples:
   42  *             meter-per-second, kilowatt-hour, kilogram-meter-per-square-second.
   43  * - MIXED: A unit composed of the sum of multiple single units. Examples: foot+inch,
   44  *          hour+minute+second, degree+arcminute+arcsecond.
   45  *
   46  * The complexity determines which operations are available. For example, you cannot set the power
   47  * or SI prefix of a compound unit.
   48  *
   49  * @draft ICU 67
   50  */
   51 enum UMeasureUnitComplexity {
   52     /**
   53      * A single unit, like kilojoule.
   54      *
   55      * @draft ICU 67
   56      */
   57     UMEASURE_UNIT_SINGLE,
   58 
   59     /**
   60      * A compound unit, like meter-per-second.
   61      * 
   62      * @draft ICU 67
   63      */
   64     UMEASURE_UNIT_COMPOUND,
   65 
   66     /**
   67      * A mixed unit, like hour+minute.
   68      *
   69      * @draft ICU 67
   70      */
   71     UMEASURE_UNIT_MIXED
   72 };
   73 
   74 /**
   75  * Enumeration for SI prefixes, such as "kilo".
   76  *
   77  * @draft ICU 67
   78  */
   79 typedef enum UMeasureSIPrefix {
   80 
   81     /**
   82      * SI prefix: yotta, 10^24.
   83      *
   84      * @draft ICU 67
   85      */
   86     UMEASURE_SI_PREFIX_YOTTA = 24,
   87 
   88     /**
   89      * SI prefix: zetta, 10^21.
   90      *
   91      * @draft ICU 67
   92      */
   93     UMEASURE_SI_PREFIX_ZETTA = 21,
   94 
   95     /**
   96      * SI prefix: exa, 10^18.
   97      *
   98      * @draft ICU 67
   99      */
  100     UMEASURE_SI_PREFIX_EXA = 18,
  101 
  102     /**
  103      * SI prefix: peta, 10^15.
  104      *
  105      * @draft ICU 67
  106      */
  107     UMEASURE_SI_PREFIX_PETA = 15,
  108 
  109     /**
  110      * SI prefix: tera, 10^12.
  111      *
  112      * @draft ICU 67
  113      */
  114     UMEASURE_SI_PREFIX_TERA = 12,
  115 
  116     /**
  117      * SI prefix: giga, 10^9.
  118      *
  119      * @draft ICU 67
  120      */
  121     UMEASURE_SI_PREFIX_GIGA = 9,
  122 
  123     /**
  124      * SI prefix: mega, 10^6.
  125      *
  126      * @draft ICU 67
  127      */
  128     UMEASURE_SI_PREFIX_MEGA = 6,
  129 
  130     /**
  131      * SI prefix: kilo, 10^3.
  132      *
  133      * @draft ICU 67
  134      */
  135     UMEASURE_SI_PREFIX_KILO = 3,
  136 
  137     /**
  138      * SI prefix: hecto, 10^2.
  139      *
  140      * @draft ICU 67
  141      */
  142     UMEASURE_SI_PREFIX_HECTO = 2,
  143 
  144     /**
  145      * SI prefix: deka, 10^1.
  146      *
  147      * @draft ICU 67
  148      */
  149     UMEASURE_SI_PREFIX_DEKA = 1,
  150 
  151     /**
  152      * The absence of an SI prefix.
  153      *
  154      * @draft ICU 67
  155      */
  156     UMEASURE_SI_PREFIX_ONE = 0,
  157 
  158     /**
  159      * SI prefix: deci, 10^-1.
  160      *
  161      * @draft ICU 67
  162      */
  163     UMEASURE_SI_PREFIX_DECI = -1,
  164 
  165     /**
  166      * SI prefix: centi, 10^-2.
  167      *
  168      * @draft ICU 67
  169      */
  170     UMEASURE_SI_PREFIX_CENTI = -2,
  171 
  172     /**
  173      * SI prefix: milli, 10^-3.
  174      *
  175      * @draft ICU 67
  176      */
  177     UMEASURE_SI_PREFIX_MILLI = -3,
  178 
  179     /**
  180      * SI prefix: micro, 10^-6.
  181      *
  182      * @draft ICU 67
  183      */
  184     UMEASURE_SI_PREFIX_MICRO = -6,
  185 
  186     /**
  187      * SI prefix: nano, 10^-9.
  188      *
  189      * @draft ICU 67
  190      */
  191     UMEASURE_SI_PREFIX_NANO = -9,
  192 
  193     /**
  194      * SI prefix: pico, 10^-12.
  195      *
  196      * @draft ICU 67
  197      */
  198     UMEASURE_SI_PREFIX_PICO = -12,
  199 
  200     /**
  201      * SI prefix: femto, 10^-15.
  202      *
  203      * @draft ICU 67
  204      */
  205     UMEASURE_SI_PREFIX_FEMTO = -15,
  206 
  207     /**
  208      * SI prefix: atto, 10^-18.
  209      *
  210      * @draft ICU 67
  211      */
  212     UMEASURE_SI_PREFIX_ATTO = -18,
  213 
  214     /**
  215      * SI prefix: zepto, 10^-21.
  216      *
  217      * @draft ICU 67
  218      */
  219     UMEASURE_SI_PREFIX_ZEPTO = -21,
  220 
  221     /**
  222      * SI prefix: yocto, 10^-24.
  223      *
  224      * @draft ICU 67
  225      */
  226     UMEASURE_SI_PREFIX_YOCTO = -24
  227 } UMeasureSIPrefix;
  228 #endif // U_HIDE_DRAFT_API
  229 
  230 /**
  231  * A unit such as length, mass, volume, currency, etc.  A unit is
  232  * coupled with a numeric amount to produce a Measure.
  233  *
  234  * @author Alan Liu
  235  * @stable ICU 3.0
  236  */
  237 class U_I18N_API MeasureUnit: public UObject {
  238  public:
  239 
  240     /**
  241      * Default constructor.
  242      * Populates the instance with the base dimensionless unit.
  243      * @stable ICU 3.0
  244      */
  245     MeasureUnit();
  246     
  247     /**
  248      * Copy constructor.
  249      * @stable ICU 3.0
  250      */
  251     MeasureUnit(const MeasureUnit &other);
  252 
  253 #ifndef U_HIDE_DRAFT_API
  254     /**
  255      * Move constructor.
  256      * @draft ICU 67
  257      */
  258     MeasureUnit(MeasureUnit &&other) noexcept;
  259 
  260     /**
  261      * Construct a MeasureUnit from a CLDR Unit Identifier, defined in UTS 35.
  262      * Validates and canonicalizes the identifier.
  263      *
  264      * <pre>
  265      * MeasureUnit example = MeasureUnit::forIdentifier("furlong-per-nanosecond")
  266      * </pre>
  267      *
  268      * @param identifier The CLDR Unit Identifier
  269      * @param status Set if the identifier is invalid.
  270      * @draft ICU 67
  271      */
  272     static MeasureUnit forIdentifier(StringPiece identifier, UErrorCode& status);
  273 #endif // U_HIDE_DRAFT_API
  274 
  275     /**
  276      * Copy assignment operator.
  277      * @stable ICU 3.0
  278      */
  279     MeasureUnit &operator=(const MeasureUnit &other);
  280 
  281 #ifndef U_HIDE_DRAFT_API
  282     /**
  283      * Move assignment operator.
  284      * @draft ICU 67
  285      */
  286     MeasureUnit &operator=(MeasureUnit &&other) noexcept;
  287 #endif // U_HIDE_DRAFT_API
  288 
  289     /**
  290      * Returns a polymorphic clone of this object.  The result will
  291      * have the same class as returned by getDynamicClassID().
  292      * @stable ICU 3.0
  293      */
  294     virtual MeasureUnit* clone() const;
  295 
  296     /**
  297      * Destructor
  298      * @stable ICU 3.0
  299      */
  300     virtual ~MeasureUnit();
  301 
  302     /**
  303      * Equality operator.  Return true if this object is equal
  304      * to the given object.
  305      * @stable ICU 3.0
  306      */
  307     virtual UBool operator==(const UObject& other) const;
  308 
  309     /**
  310      * Inequality operator.  Return true if this object is not equal
  311      * to the given object.
  312      * @stable ICU 53
  313      */
  314     UBool operator!=(const UObject& other) const {
  315         return !(*this == other);
  316     }
  317 
  318     /**
  319      * Get the type.
  320      *
  321      * If the unit does not have a type, the empty string is returned.
  322      *
  323      * @stable ICU 53
  324      */
  325     const char *getType() const;
  326 
  327     /**
  328      * Get the sub type.
  329      *
  330      * If the unit does not have a subtype, the empty string is returned.
  331      *
  332      * @stable ICU 53
  333      */
  334     const char *getSubtype() const;
  335 
  336 #ifndef U_HIDE_DRAFT_API
  337     /**
  338      * Get the CLDR Unit Identifier for this MeasureUnit, as defined in UTS 35.
  339      *
  340      * @return The string form of this unit, owned by this MeasureUnit.
  341      * @draft ICU 67
  342      */
  343     const char* getIdentifier() const;
  344 
  345     /**
  346      * Compute the complexity of the unit. See UMeasureUnitComplexity for more information.
  347      *
  348      * @param status Set if an error occurs.
  349      * @return The unit complexity.
  350      * @draft ICU 67
  351      */
  352     UMeasureUnitComplexity getComplexity(UErrorCode& status) const;
  353 
  354     /**
  355      * Creates a MeasureUnit which is this SINGLE unit augmented with the specified SI prefix.
  356      * For example, UMEASURE_SI_PREFIX_KILO for "kilo".
  357      *
  358      * There is sufficient locale data to format all standard SI prefixes.
  359      *
  360      * NOTE: Only works on SINGLE units. If this is a COMPOUND or MIXED unit, an error will
  361      * occur. For more information, see UMeasureUnitComplexity.
  362      *
  363      * @param prefix The SI prefix, from UMeasureSIPrefix.
  364      * @param status Set if this is not a SINGLE unit or if another error occurs.
  365      * @return A new SINGLE unit.
  366      * @draft ICU 67
  367      */
  368     MeasureUnit withSIPrefix(UMeasureSIPrefix prefix, UErrorCode& status) const;
  369 
  370     /**
  371      * Gets the current SI prefix of this SINGLE unit. For example, if the unit has the SI prefix
  372      * "kilo", then UMEASURE_SI_PREFIX_KILO is returned.
  373      *
  374      * NOTE: Only works on SINGLE units. If this is a COMPOUND or MIXED unit, an error will
  375      * occur. For more information, see UMeasureUnitComplexity.
  376      *
  377      * @param status Set if this is not a SINGLE unit or if another error occurs.
  378      * @return The SI prefix of this SINGLE unit, from UMeasureSIPrefix.
  379      * @draft ICU 67
  380      */
  381     UMeasureSIPrefix getSIPrefix(UErrorCode& status) const;
  382 
  383     /**
  384      * Creates a MeasureUnit which is this SINGLE unit augmented with the specified dimensionality
  385      * (power). For example, if dimensionality is 2, the unit will be squared.
  386      *
  387      * NOTE: Only works on SINGLE units. If this is a COMPOUND or MIXED unit, an error will
  388      * occur. For more information, see UMeasureUnitComplexity.
  389      *
  390      * For the base dimensionless unit, withDimensionality does nothing.
  391      *
  392      * @param dimensionality The dimensionality (power).
  393      * @param status Set if this is not a SINGLE unit or if another error occurs.
  394      * @return A new SINGLE unit.
  395      * @draft ICU 67
  396      */
  397     MeasureUnit withDimensionality(int32_t dimensionality, UErrorCode& status) const;
  398 
  399     /**
  400      * Gets the dimensionality (power) of this MeasureUnit. For example, if the unit is square,
  401      * then 2 is returned.
  402      *
  403      * NOTE: Only works on SINGLE units. If this is a COMPOUND or MIXED unit, an error will
  404      * occur. For more information, see UMeasureUnitComplexity.
  405      *
  406      * For the base dimensionless unit, getDimensionality returns 0.
  407      *
  408      * @param status Set if this is not a SINGLE unit or if another error occurs.
  409      * @return The dimensionality (power) of this simple unit.
  410      * @draft ICU 67
  411      */
  412     int32_t getDimensionality(UErrorCode& status) const;
  413 
  414     /**
  415      * Gets the reciprocal of this MeasureUnit, with the numerator and denominator flipped.
  416      *
  417      * For example, if the receiver is "meter-per-second", the unit "second-per-meter" is returned.
  418      *
  419      * NOTE: Only works on SINGLE and COMPOUND units. If this is a MIXED unit, an error will
  420      * occur. For more information, see UMeasureUnitComplexity.
  421      *
  422      * @param status Set if this is a MIXED unit or if another error occurs.
  423      * @return The reciprocal of the target unit.
  424      * @draft ICU 67
  425      */
  426     MeasureUnit reciprocal(UErrorCode& status) const;
  427 
  428     /**
  429      * Gets the product of this unit with another unit. This is a way to build units from
  430      * constituent parts.
  431      *
  432      * The numerator and denominator are preserved through this operation.
  433      *
  434      * For example, if the receiver is "kilowatt" and the argument is "hour-per-day", then the
  435      * unit "kilowatt-hour-per-day" is returned.
  436      *
  437      * NOTE: Only works on SINGLE and COMPOUND units. If either unit (receivee and argument) is a
  438      * MIXED unit, an error will occur. For more information, see UMeasureUnitComplexity.
  439      *
  440      * @param other The MeasureUnit to multiply with the target.
  441      * @param status Set if this or other is a MIXED unit or if another error occurs.
  442      * @return The product of the target unit with the provided unit.
  443      * @draft ICU 67
  444      */
  445     MeasureUnit product(const MeasureUnit& other, UErrorCode& status) const;
  446 #endif // U_HIDE_DRAFT_API
  447 
  448 #ifndef U_HIDE_INTERNAL_API
  449     /**
  450      * Gets the list of SINGLE units contained within a MIXED of COMPOUND unit.
  451      *
  452      * Examples:
  453      * - Given "meter-kilogram-per-second", three units will be returned: "meter",
  454      *   "kilogram", and "per-second".
  455      * - Given "hour+minute+second", three units will be returned: "hour", "minute",
  456      *   and "second".
  457      *
  458      * If this is a SINGLE unit, an array of length 1 will be returned.
  459      *
  460      * TODO(ICU-21021): Finalize this API and propose it as draft.
  461      *
  462      * @param outCount The number of elements in the return array.
  463      * @param status Set if an error occurs.
  464      * @return An array of single units, owned by the caller.
  465      * @internal ICU 67 Technical Preview
  466      */
  467     LocalArray<MeasureUnit> splitToSingleUnits(int32_t& outCount, UErrorCode& status) const;
  468 #endif // U_HIDE_INTERNAL_API
  469 
  470     /**
  471      * getAvailable gets all of the available units.
  472      * If there are too many units to fit into destCapacity then the
  473      * error code is set to U_BUFFER_OVERFLOW_ERROR.
  474      *
  475      * @param destArray destination buffer.
  476      * @param destCapacity number of MeasureUnit instances available at dest.
  477      * @param errorCode ICU error code.
  478      * @return number of available units.
  479      * @stable ICU 53
  480      */
  481     static int32_t getAvailable(
  482             MeasureUnit *destArray,
  483             int32_t destCapacity,
  484             UErrorCode &errorCode);
  485 
  486     /**
  487      * getAvailable gets all of the available units for a specific type.
  488      * If there are too many units to fit into destCapacity then the
  489      * error code is set to U_BUFFER_OVERFLOW_ERROR.
  490      *
  491      * @param type the type
  492      * @param destArray destination buffer.
  493      * @param destCapacity number of MeasureUnit instances available at dest.
  494      * @param errorCode ICU error code.
  495      * @return number of available units for type.
  496      * @stable ICU 53
  497      */
  498     static int32_t getAvailable(
  499             const char *type,
  500             MeasureUnit *destArray,
  501             int32_t destCapacity,
  502             UErrorCode &errorCode);
  503 
  504     /**
  505      * getAvailableTypes gets all of the available types. Caller owns the
  506      * returned StringEnumeration and must delete it when finished using it.
  507      *
  508      * @param errorCode ICU error code.
  509      * @return the types.
  510      * @stable ICU 53
  511      */
  512     static StringEnumeration* getAvailableTypes(UErrorCode &errorCode);
  513 
  514     /**
  515      * Return the class ID for this class. This is useful only for comparing to
  516      * a return value from getDynamicClassID(). For example:
  517      * <pre>
  518      * .   Base* polymorphic_pointer = createPolymorphicObject();
  519      * .   if (polymorphic_pointer->getDynamicClassID() ==
  520      * .       Derived::getStaticClassID()) ...
  521      * </pre>
  522      * @return          The class ID for all objects of this class.
  523      * @stable ICU 53
  524      */
  525     static UClassID U_EXPORT2 getStaticClassID(void);
  526 
  527     /**
  528      * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This
  529      * method is to implement a simple version of RTTI, since not all C++
  530      * compilers support genuine RTTI. Polymorphic operator==() and clone()
  531      * methods call this method.
  532      *
  533      * @return          The class ID for this object. All objects of a
  534      *                  given class have the same class ID.  Objects of
  535      *                  other classes have different class IDs.
  536      * @stable ICU 53
  537      */
  538     virtual UClassID getDynamicClassID(void) const;
  539 
  540 #ifndef U_HIDE_INTERNAL_API
  541     /**
  542      * ICU use only.
  543      * Returns associated array index for this measure unit. Only valid for
  544      * non-currency measure units.
  545      * @internal
  546      */
  547     int32_t getIndex() const;
  548 
  549     /**
  550      * ICU use only.
  551      * Returns maximum value from getIndex plus 1.
  552      * @internal
  553      */
  554     static int32_t getIndexCount();
  555 
  556     /**
  557      * ICU use only.
  558      * @return the unit.getIndex() of the unit which has this unit.getType() and unit.getSubtype(),
  559      *         or a negative value if there is no such unit
  560      * @internal
  561      */
  562     static int32_t internalGetIndexForTypeAndSubtype(const char *type, const char *subtype);
  563 
  564     /**
  565      * ICU use only.
  566      * @internal
  567      */
  568     static MeasureUnit resolveUnitPerUnit(
  569             const MeasureUnit &unit, const MeasureUnit &perUnit, bool* isResolved);
  570 #endif /* U_HIDE_INTERNAL_API */
  571 
  572 // All code between the "Start generated createXXX methods" comment and
  573 // the "End generated createXXX methods" comment is auto generated code
  574 // and must not be edited manually. For instructions on how to correctly
  575 // update this code, refer to:
  576 // http://site.icu-project.org/design/formatting/measureformat/updating-measure-unit
  577 //
  578 // Start generated createXXX methods
  579 
  580     /**
  581      * Returns by pointer, unit of acceleration: g-force.
  582      * Caller owns returned value and must free it.
  583      * Also see {@link #getGForce()}.
  584      * @param status ICU error code.
  585      * @stable ICU 53
  586      */
  587     static MeasureUnit *createGForce(UErrorCode &status);
  588 
  589     /**
  590      * Returns by value, unit of acceleration: g-force.
  591      * Also see {@link #createGForce()}.
  592      * @stable ICU 64
  593      */
  594     static MeasureUnit getGForce();
  595 
  596     /**
  597      * Returns by pointer, unit of acceleration: meter-per-square-second.
  598      * Caller owns returned value and must free it.
  599      * Also see {@link #getMeterPerSecondSquared()}.
  600      * @param status ICU error code.
  601      * @stable ICU 54
  602      */
  603     static MeasureUnit *createMeterPerSecondSquared(UErrorCode &status);
  604 
  605     /**
  606      * Returns by value, unit of acceleration: meter-per-square-second.
  607      * Also see {@link #createMeterPerSecondSquared()}.
  608      * @stable ICU 64
  609      */
  610     static MeasureUnit getMeterPerSecondSquared();
  611 
  612     /**
  613      * Returns by pointer, unit of angle: arc-minute.
  614      * Caller owns returned value and must free it.
  615      * Also see {@link #getArcMinute()}.
  616      * @param status ICU error code.
  617      * @stable ICU 53
  618      */
  619     static MeasureUnit *createArcMinute(UErrorCode &status);
  620 
  621     /**
  622      * Returns by value, unit of angle: arc-minute.
  623      * Also see {@link #createArcMinute()}.
  624      * @stable ICU 64
  625      */
  626     static MeasureUnit getArcMinute();
  627 
  628     /**
  629      * Returns by pointer, unit of angle: arc-second.
  630      * Caller owns returned value and must free it.
  631      * Also see {@link #getArcSecond()}.
  632      * @param status ICU error code.
  633      * @stable ICU 53
  634      */
  635     static MeasureUnit *createArcSecond(UErrorCode &status);
  636 
  637     /**
  638      * Returns by value, unit of angle: arc-second.
  639      * Also see {@link #createArcSecond()}.
  640      * @stable ICU 64
  641      */
  642     static MeasureUnit getArcSecond();
  643 
  644     /**
  645      * Returns by pointer, unit of angle: degree.
  646      * Caller owns returned value and must free it.
  647      * Also see {@link #getDegree()}.
  648      * @param status ICU error code.
  649      * @stable ICU 53
  650      */
  651     static MeasureUnit *createDegree(UErrorCode &status);
  652 
  653     /**
  654      * Returns by value, unit of angle: degree.
  655      * Also see {@link #createDegree()}.
  656      * @stable ICU 64
  657      */
  658     static MeasureUnit getDegree();
  659 
  660     /**
  661      * Returns by pointer, unit of angle: radian.
  662      * Caller owns returned value and must free it.
  663      * Also see {@link #getRadian()}.
  664      * @param status ICU error code.
  665      * @stable ICU 54
  666      */
  667     static MeasureUnit *createRadian(UErrorCode &status);
  668 
  669     /**
  670      * Returns by value, unit of angle: radian.
  671      * Also see {@link #createRadian()}.
  672      * @stable ICU 64
  673      */
  674     static MeasureUnit getRadian();
  675 
  676     /**
  677      * Returns by pointer, unit of angle: revolution.
  678      * Caller owns returned value and must free it.
  679      * Also see {@link #getRevolutionAngle()}.
  680      * @param status ICU error code.
  681      * @stable ICU 56
  682      */
  683     static MeasureUnit *createRevolutionAngle(UErrorCode &status);
  684 
  685     /**
  686      * Returns by value, unit of angle: revolution.
  687      * Also see {@link #createRevolutionAngle()}.
  688      * @stable ICU 64
  689      */
  690     static MeasureUnit getRevolutionAngle();
  691 
  692     /**
  693      * Returns by pointer, unit of area: acre.
  694      * Caller owns returned value and must free it.
  695      * Also see {@link #getAcre()}.
  696      * @param status ICU error code.
  697      * @stable ICU 53
  698      */
  699     static MeasureUnit *createAcre(UErrorCode &status);
  700 
  701     /**
  702      * Returns by value, unit of area: acre.
  703      * Also see {@link #createAcre()}.
  704      * @stable ICU 64
  705      */
  706     static MeasureUnit getAcre();
  707 
  708     /**
  709      * Returns by pointer, unit of area: dunam.
  710      * Caller owns returned value and must free it.
  711      * Also see {@link #getDunam()}.
  712      * @param status ICU error code.
  713      * @stable ICU 64
  714      */
  715     static MeasureUnit *createDunam(UErrorCode &status);
  716 
  717     /**
  718      * Returns by value, unit of area: dunam.
  719      * Also see {@link #createDunam()}.
  720      * @stable ICU 64
  721      */
  722     static MeasureUnit getDunam();
  723 
  724     /**
  725      * Returns by pointer, unit of area: hectare.
  726      * Caller owns returned value and must free it.
  727      * Also see {@link #getHectare()}.
  728      * @param status ICU error code.
  729      * @stable ICU 53
  730      */
  731     static MeasureUnit *createHectare(UErrorCode &status);
  732 
  733     /**
  734      * Returns by value, unit of area: hectare.
  735      * Also see {@link #createHectare()}.
  736      * @stable ICU 64
  737      */
  738     static MeasureUnit getHectare();
  739 
  740     /**
  741      * Returns by pointer, unit of area: square-centimeter.
  742      * Caller owns returned value and must free it.
  743      * Also see {@link #getSquareCentimeter()}.
  744      * @param status ICU error code.
  745      * @stable ICU 54
  746      */
  747     static MeasureUnit *createSquareCentimeter(UErrorCode &status);
  748 
  749     /**
  750      * Returns by value, unit of area: square-centimeter.
  751      * Also see {@link #createSquareCentimeter()}.
  752      * @stable ICU 64
  753      */
  754     static MeasureUnit getSquareCentimeter();
  755 
  756     /**
  757      * Returns by pointer, unit of area: square-foot.
  758      * Caller owns returned value and must free it.
  759      * Also see {@link #getSquareFoot()}.
  760      * @param status ICU error code.
  761      * @stable ICU 53
  762      */
  763     static MeasureUnit *createSquareFoot(UErrorCode &status);
  764 
  765     /**
  766      * Returns by value, unit of area: square-foot.
  767      * Also see {@link #createSquareFoot()}.
  768      * @stable ICU 64
  769      */
  770     static MeasureUnit getSquareFoot();
  771 
  772     /**
  773      * Returns by pointer, unit of area: square-inch.
  774      * Caller owns returned value and must free it.
  775      * Also see {@link #getSquareInch()}.
  776      * @param status ICU error code.
  777      * @stable ICU 54
  778      */
  779     static MeasureUnit *createSquareInch(UErrorCode &status);
  780 
  781     /**
  782      * Returns by value, unit of area: square-inch.
  783      * Also see {@link #createSquareInch()}.
  784      * @stable ICU 64
  785      */
  786     static MeasureUnit getSquareInch();
  787 
  788     /**
  789      * Returns by pointer, unit of area: square-kilometer.
  790      * Caller owns returned value and must free it.
  791      * Also see {@link #getSquareKilometer()}.
  792      * @param status ICU error code.
  793      * @stable ICU 53
  794      */
  795     static MeasureUnit *createSquareKilometer(UErrorCode &status);
  796 
  797     /**
  798      * Returns by value, unit of area: square-kilometer.
  799      * Also see {@link #createSquareKilometer()}.
  800      * @stable ICU 64
  801      */
  802     static MeasureUnit getSquareKilometer();
  803 
  804     /**
  805      * Returns by pointer, unit of area: square-meter.
  806      * Caller owns returned value and must free it.
  807      * Also see {@link #getSquareMeter()}.
  808      * @param status ICU error code.
  809      * @stable ICU 53
  810      */
  811     static MeasureUnit *createSquareMeter(UErrorCode &status);
  812 
  813     /**
  814      * Returns by value, unit of area: square-meter.
  815      * Also see {@link #createSquareMeter()}.
  816      * @stable ICU 64
  817      */
  818     static MeasureUnit getSquareMeter();
  819 
  820     /**
  821      * Returns by pointer, unit of area: square-mile.
  822      * Caller owns returned value and must free it.
  823      * Also see {@link #getSquareMile()}.
  824      * @param status ICU error code.
  825      * @stable ICU 53
  826      */
  827     static MeasureUnit *createSquareMile(UErrorCode &status);
  828 
  829     /**
  830      * Returns by value, unit of area: square-mile.
  831      * Also see {@link #createSquareMile()}.
  832      * @stable ICU 64
  833      */
  834     static MeasureUnit getSquareMile();
  835 
  836     /**
  837      * Returns by pointer, unit of area: square-yard.
  838      * Caller owns returned value and must free it.
  839      * Also see {@link #getSquareYard()}.
  840      * @param status ICU error code.
  841      * @stable ICU 54
  842      */
  843     static MeasureUnit *createSquareYard(UErrorCode &status);
  844 
  845     /**
  846      * Returns by value, unit of area: square-yard.
  847      * Also see {@link #createSquareYard()}.
  848      * @stable ICU 64
  849      */
  850     static MeasureUnit getSquareYard();
  851 
  852     /**
  853      * Returns by pointer, unit of concentr: karat.
  854      * Caller owns returned value and must free it.
  855      * Also see {@link #getKarat()}.
  856      * @param status ICU error code.
  857      * @stable ICU 54
  858      */
  859     static MeasureUnit *createKarat(UErrorCode &status);
  860 
  861     /**
  862      * Returns by value, unit of concentr: karat.
  863      * Also see {@link #createKarat()}.
  864      * @stable ICU 64
  865      */
  866     static MeasureUnit getKarat();
  867 
  868     /**
  869      * Returns by pointer, unit of concentr: milligram-per-deciliter.
  870      * Caller owns returned value and must free it.
  871      * Also see {@link #getMilligramPerDeciliter()}.
  872      * @param status ICU error code.
  873      * @stable ICU 57
  874      */
  875     static MeasureUnit *createMilligramPerDeciliter(UErrorCode &status);
  876 
  877     /**
  878      * Returns by value, unit of concentr: milligram-per-deciliter.
  879      * Also see {@link #createMilligramPerDeciliter()}.
  880      * @stable ICU 64
  881      */
  882     static MeasureUnit getMilligramPerDeciliter();
  883 
  884     /**
  885      * Returns by pointer, unit of concentr: millimole-per-liter.
  886      * Caller owns returned value and must free it.
  887      * Also see {@link #getMillimolePerLiter()}.
  888      * @param status ICU error code.
  889      * @stable ICU 57
  890      */
  891     static MeasureUnit *createMillimolePerLiter(UErrorCode &status);
  892 
  893     /**
  894      * Returns by value, unit of concentr: millimole-per-liter.
  895      * Also see {@link #createMillimolePerLiter()}.
  896      * @stable ICU 64
  897      */
  898     static MeasureUnit getMillimolePerLiter();
  899 
  900     /**
  901      * Returns by pointer, unit of concentr: mole.
  902      * Caller owns returned value and must free it.
  903      * Also see {@link #getMole()}.
  904      * @param status ICU error code.
  905      * @stable ICU 64
  906      */
  907     static MeasureUnit *createMole(UErrorCode &status);
  908 
  909     /**
  910      * Returns by value, unit of concentr: mole.
  911      * Also see {@link #createMole()}.
  912      * @stable ICU 64
  913      */
  914     static MeasureUnit getMole();
  915 
  916     /**
  917      * Returns by pointer, unit of concentr: permillion.
  918      * Caller owns returned value and must free it.
  919      * Also see {@link #getPartPerMillion()}.
  920      * @param status ICU error code.
  921      * @stable ICU 57
  922      */
  923     static MeasureUnit *createPartPerMillion(UErrorCode &status);
  924 
  925     /**
  926      * Returns by value, unit of concentr: permillion.
  927      * Also see {@link #createPartPerMillion()}.
  928      * @stable ICU 64
  929      */
  930     static MeasureUnit getPartPerMillion();
  931 
  932     /**
  933      * Returns by pointer, unit of concentr: percent.
  934      * Caller owns returned value and must free it.
  935      * Also see {@link #getPercent()}.
  936      * @param status ICU error code.
  937      * @stable ICU 63
  938      */
  939     static MeasureUnit *createPercent(UErrorCode &status);
  940 
  941     /**
  942      * Returns by value, unit of concentr: percent.
  943      * Also see {@link #createPercent()}.
  944      * @stable ICU 64
  945      */
  946     static MeasureUnit getPercent();
  947 
  948     /**
  949      * Returns by pointer, unit of concentr: permille.
  950      * Caller owns returned value and must free it.
  951      * Also see {@link #getPermille()}.
  952      * @param status ICU error code.
  953      * @stable ICU 63
  954      */
  955     static MeasureUnit *createPermille(UErrorCode &status);
  956 
  957     /**
  958      * Returns by value, unit of concentr: permille.
  959      * Also see {@link #createPermille()}.
  960      * @stable ICU 64
  961      */
  962     static MeasureUnit getPermille();
  963 
  964     /**
  965      * Returns by pointer, unit of concentr: permyriad.
  966      * Caller owns returned value and must free it.
  967      * Also see {@link #getPermyriad()}.
  968      * @param status ICU error code.
  969      * @stable ICU 64
  970      */
  971     static MeasureUnit *createPermyriad(UErrorCode &status);
  972 
  973     /**
  974      * Returns by value, unit of concentr: permyriad.
  975      * Also see {@link #createPermyriad()}.
  976      * @stable ICU 64
  977      */
  978     static MeasureUnit getPermyriad();
  979 
  980     /**
  981      * Returns by pointer, unit of consumption: liter-per-100-kilometer.
  982      * Caller owns returned value and must free it.
  983      * Also see {@link #getLiterPer100Kilometers()}.
  984      * @param status ICU error code.
  985      * @stable ICU 56
  986      */
  987     static MeasureUnit *createLiterPer100Kilometers(UErrorCode &status);
  988 
  989     /**
  990      * Returns by value, unit of consumption: liter-per-100-kilometer.
  991      * Also see {@link #createLiterPer100Kilometers()}.
  992      * @stable ICU 64
  993      */
  994     static MeasureUnit getLiterPer100Kilometers();
  995 
  996     /**
  997      * Returns by pointer, unit of consumption: liter-per-kilometer.
  998      * Caller owns returned value and must free it.
  999      * Also see {@link #getLiterPerKilometer()}.
 1000      * @param status ICU error code.
 1001      * @stable ICU 54
 1002      */
 1003     static MeasureUnit *createLiterPerKilometer(UErrorCode &status);
 1004 
 1005     /**
 1006      * Returns by value, unit of consumption: liter-per-kilometer.
 1007      * Also see {@link #createLiterPerKilometer()}.
 1008      * @stable ICU 64
 1009      */
 1010     static MeasureUnit getLiterPerKilometer();
 1011 
 1012     /**
 1013      * Returns by pointer, unit of consumption: mile-per-gallon.
 1014      * Caller owns returned value and must free it.
 1015      * Also see {@link #getMilePerGallon()}.
 1016      * @param status ICU error code.
 1017      * @stable ICU 54
 1018      */
 1019     static MeasureUnit *createMilePerGallon(UErrorCode &status);
 1020 
 1021     /**
 1022      * Returns by value, unit of consumption: mile-per-gallon.
 1023      * Also see {@link #createMilePerGallon()}.
 1024      * @stable ICU 64
 1025      */
 1026     static MeasureUnit getMilePerGallon();
 1027 
 1028     /**
 1029      * Returns by pointer, unit of consumption: mile-per-gallon-imperial.
 1030      * Caller owns returned value and must free it.
 1031      * Also see {@link #getMilePerGallonImperial()}.
 1032      * @param status ICU error code.
 1033      * @stable ICU 57
 1034      */
 1035     static MeasureUnit *createMilePerGallonImperial(UErrorCode &status);
 1036 
 1037     /**
 1038      * Returns by value, unit of consumption: mile-per-gallon-imperial.
 1039      * Also see {@link #createMilePerGallonImperial()}.
 1040      * @stable ICU 64
 1041      */
 1042     static MeasureUnit getMilePerGallonImperial();
 1043 
 1044     /**
 1045      * Returns by pointer, unit of digital: bit.
 1046      * Caller owns returned value and must free it.
 1047      * Also see {@link #getBit()}.
 1048      * @param status ICU error code.
 1049      * @stable ICU 54
 1050      */
 1051     static MeasureUnit *createBit(UErrorCode &status);
 1052 
 1053     /**
 1054      * Returns by value, unit of digital: bit.
 1055      * Also see {@link #createBit()}.
 1056      * @stable ICU 64
 1057      */
 1058     static MeasureUnit getBit();
 1059 
 1060     /**
 1061      * Returns by pointer, unit of digital: byte.
 1062      * Caller owns returned value and must free it.
 1063      * Also see {@link #getByte()}.
 1064      * @param status ICU error code.
 1065      * @stable ICU 54
 1066      */
 1067     static MeasureUnit *createByte(UErrorCode &status);
 1068 
 1069     /**
 1070      * Returns by value, unit of digital: byte.
 1071      * Also see {@link #createByte()}.
 1072      * @stable ICU 64
 1073      */
 1074     static MeasureUnit getByte();
 1075 
 1076     /**
 1077      * Returns by pointer, unit of digital: gigabit.
 1078      * Caller owns returned value and must free it.
 1079      * Also see {@link #getGigabit()}.
 1080      * @param status ICU error code.
 1081      * @stable ICU 54
 1082      */
 1083     static MeasureUnit *createGigabit(UErrorCode &status);
 1084 
 1085     /**
 1086      * Returns by value, unit of digital: gigabit.
 1087      * Also see {@link #createGigabit()}.
 1088      * @stable ICU 64
 1089      */
 1090     static MeasureUnit getGigabit();
 1091 
 1092     /**
 1093      * Returns by pointer, unit of digital: gigabyte.
 1094      * Caller owns returned value and must free it.
 1095      * Also see {@link #getGigabyte()}.
 1096      * @param status ICU error code.
 1097      * @stable ICU 54
 1098      */
 1099     static MeasureUnit *createGigabyte(UErrorCode &status);
 1100 
 1101     /**
 1102      * Returns by value, unit of digital: gigabyte.
 1103      * Also see {@link #createGigabyte()}.
 1104      * @stable ICU 64
 1105      */
 1106     static MeasureUnit getGigabyte();
 1107 
 1108     /**
 1109      * Returns by pointer, unit of digital: kilobit.
 1110      * Caller owns returned value and must free it.
 1111      * Also see {@link #getKilobit()}.
 1112      * @param status ICU error code.
 1113      * @stable ICU 54
 1114      */
 1115     static MeasureUnit *createKilobit(UErrorCode &status);
 1116 
 1117     /**
 1118      * Returns by value, unit of digital: kilobit.
 1119      * Also see {@link #createKilobit()}.
 1120      * @stable ICU 64
 1121      */
 1122     static MeasureUnit getKilobit();
 1123 
 1124     /**
 1125      * Returns by pointer, unit of digital: kilobyte.
 1126      * Caller owns returned value and must free it.
 1127      * Also see {@link #getKilobyte()}.
 1128      * @param status ICU error code.
 1129      * @stable ICU 54
 1130      */
 1131     static MeasureUnit *createKilobyte(UErrorCode &status);
 1132 
 1133     /**
 1134      * Returns by value, unit of digital: kilobyte.
 1135      * Also see {@link #createKilobyte()}.
 1136      * @stable ICU 64
 1137      */
 1138     static MeasureUnit getKilobyte();
 1139 
 1140     /**
 1141      * Returns by pointer, unit of digital: megabit.
 1142      * Caller owns returned value and must free it.
 1143      * Also see {@link #getMegabit()}.
 1144      * @param status ICU error code.
 1145      * @stable ICU 54
 1146      */
 1147     static MeasureUnit *createMegabit(UErrorCode &status);
 1148 
 1149     /**
 1150      * Returns by value, unit of digital: megabit.
 1151      * Also see {@link #createMegabit()}.
 1152      * @stable ICU 64
 1153      */
 1154     static MeasureUnit getMegabit();
 1155 
 1156     /**
 1157      * Returns by pointer, unit of digital: megabyte.
 1158      * Caller owns returned value and must free it.
 1159      * Also see {@link #getMegabyte()}.
 1160      * @param status ICU error code.
 1161      * @stable ICU 54
 1162      */
 1163     static MeasureUnit *createMegabyte(UErrorCode &status);
 1164 
 1165     /**
 1166      * Returns by value, unit of digital: megabyte.
 1167      * Also see {@link #createMegabyte()}.
 1168      * @stable ICU 64
 1169      */
 1170     static MeasureUnit getMegabyte();
 1171 
 1172     /**
 1173      * Returns by pointer, unit of digital: petabyte.
 1174      * Caller owns returned value and must free it.
 1175      * Also see {@link #getPetabyte()}.
 1176      * @param status ICU error code.
 1177      * @stable ICU 63
 1178      */
 1179     static MeasureUnit *createPetabyte(UErrorCode &status);
 1180 
 1181     /**
 1182      * Returns by value, unit of digital: petabyte.
 1183      * Also see {@link #createPetabyte()}.
 1184      * @stable ICU 64
 1185      */
 1186     static MeasureUnit getPetabyte();
 1187 
 1188     /**
 1189      * Returns by pointer, unit of digital: terabit.
 1190      * Caller owns returned value and must free it.
 1191      * Also see {@link #getTerabit()}.
 1192      * @param status ICU error code.
 1193      * @stable ICU 54
 1194      */
 1195     static MeasureUnit *createTerabit(UErrorCode &status);
 1196 
 1197     /**
 1198      * Returns by value, unit of digital: terabit.
 1199      * Also see {@link #createTerabit()}.
 1200      * @stable ICU 64
 1201      */
 1202     static MeasureUnit getTerabit();
 1203 
 1204     /**
 1205      * Returns by pointer, unit of digital: terabyte.
 1206      * Caller owns returned value and must free it.
 1207      * Also see {@link #getTerabyte()}.
 1208      * @param status ICU error code.
 1209      * @stable ICU 54
 1210      */
 1211     static MeasureUnit *createTerabyte(UErrorCode &status);
 1212 
 1213     /**
 1214      * Returns by value, unit of digital: terabyte.
 1215      * Also see {@link #createTerabyte()}.
 1216      * @stable ICU 64
 1217      */
 1218     static MeasureUnit getTerabyte();
 1219 
 1220     /**
 1221      * Returns by pointer, unit of duration: century.
 1222      * Caller owns returned value and must free it.
 1223      * Also see {@link #getCentury()}.
 1224      * @param status ICU error code.
 1225      * @stable ICU 56
 1226      */
 1227     static MeasureUnit *createCentury(UErrorCode &status);
 1228 
 1229     /**
 1230      * Returns by value, unit of duration: century.
 1231      * Also see {@link #createCentury()}.
 1232      * @stable ICU 64
 1233      */
 1234     static MeasureUnit getCentury();
 1235 
 1236     /**
 1237      * Returns by pointer, unit of duration: day.
 1238      * Caller owns returned value and must free it.
 1239      * Also see {@link #getDay()}.
 1240      * @param status ICU error code.
 1241      * @stable ICU 53
 1242      */
 1243     static MeasureUnit *createDay(UErrorCode &status);
 1244 
 1245     /**
 1246      * Returns by value, unit of duration: day.
 1247      * Also see {@link #createDay()}.
 1248      * @stable ICU 64
 1249      */
 1250     static MeasureUnit getDay();
 1251 
 1252     /**
 1253      * Returns by pointer, unit of duration: day-person.
 1254      * Caller owns returned value and must free it.
 1255      * Also see {@link #getDayPerson()}.
 1256      * @param status ICU error code.
 1257      * @stable ICU 64
 1258      */
 1259     static MeasureUnit *createDayPerson(UErrorCode &status);
 1260 
 1261     /**
 1262      * Returns by value, unit of duration: day-person.
 1263      * Also see {@link #createDayPerson()}.
 1264      * @stable ICU 64
 1265      */
 1266     static MeasureUnit getDayPerson();
 1267 
 1268 #ifndef U_HIDE_DRAFT_API
 1269     /**
 1270      * Returns by pointer, unit of duration: decade.
 1271      * Caller owns returned value and must free it.
 1272      * Also see {@link #getDecade()}.
 1273      * @param status ICU error code.
 1274      * @draft ICU 65
 1275      */
 1276     static MeasureUnit *createDecade(UErrorCode &status);
 1277 
 1278     /**
 1279      * Returns by value, unit of duration: decade.
 1280      * Also see {@link #createDecade()}.
 1281      * @draft ICU 65
 1282      */
 1283     static MeasureUnit getDecade();
 1284 #endif /* U_HIDE_DRAFT_API */
 1285 
 1286     /**
 1287      * Returns by pointer, unit of duration: hour.
 1288      * Caller owns returned value and must free it.
 1289      * Also see {@link #getHour()}.
 1290      * @param status ICU error code.
 1291      * @stable ICU 53
 1292      */
 1293     static MeasureUnit *createHour(UErrorCode &status);
 1294 
 1295     /**
 1296      * Returns by value, unit of duration: hour.
 1297      * Also see {@link #createHour()}.
 1298      * @stable ICU 64
 1299      */
 1300     static MeasureUnit getHour();
 1301 
 1302     /**
 1303      * Returns by pointer, unit of duration: microsecond.
 1304      * Caller owns returned value and must free it.
 1305      * Also see {@link #getMicrosecond()}.
 1306      * @param status ICU error code.
 1307      * @stable ICU 54
 1308      */
 1309     static MeasureUnit *createMicrosecond(UErrorCode &status);
 1310 
 1311     /**
 1312      * Returns by value, unit of duration: microsecond.
 1313      * Also see {@link #createMicrosecond()}.
 1314      * @stable ICU 64
 1315      */
 1316     static MeasureUnit getMicrosecond();
 1317 
 1318     /**
 1319      * Returns by pointer, unit of duration: millisecond.
 1320      * Caller owns returned value and must free it.
 1321      * Also see {@link #getMillisecond()}.
 1322      * @param status ICU error code.
 1323      * @stable ICU 53
 1324      */
 1325     static MeasureUnit *createMillisecond(UErrorCode &status);
 1326 
 1327     /**
 1328      * Returns by value, unit of duration: millisecond.
 1329      * Also see {@link #createMillisecond()}.
 1330      * @stable ICU 64
 1331      */
 1332     static MeasureUnit getMillisecond();
 1333 
 1334     /**
 1335      * Returns by pointer, unit of duration: minute.
 1336      * Caller owns returned value and must free it.
 1337      * Also see {@link #getMinute()}.
 1338      * @param status ICU error code.
 1339      * @stable ICU 53
 1340      */
 1341     static MeasureUnit *createMinute(UErrorCode &status);
 1342 
 1343     /**
 1344      * Returns by value, unit of duration: minute.
 1345      * Also see {@link #createMinute()}.
 1346      * @stable ICU 64
 1347      */
 1348     static MeasureUnit getMinute();
 1349 
 1350     /**
 1351      * Returns by pointer, unit of duration: month.
 1352      * Caller owns returned value and must free it.
 1353      * Also see {@link #getMonth()}.
 1354      * @param status ICU error code.
 1355      * @stable ICU 53
 1356      */
 1357     static MeasureUnit *createMonth(UErrorCode &status);
 1358 
 1359     /**
 1360      * Returns by value, unit of duration: month.
 1361      * Also see {@link #createMonth()}.
 1362      * @stable ICU 64
 1363      */
 1364     static MeasureUnit getMonth();
 1365 
 1366     /**
 1367      * Returns by pointer, unit of duration: month-person.
 1368      * Caller owns returned value and must free it.
 1369      * Also see {@link #getMonthPerson()}.
 1370      * @param status ICU error code.
 1371      * @stable ICU 64
 1372      */
 1373     static MeasureUnit *createMonthPerson(UErrorCode &status);
 1374 
 1375     /**
 1376      * Returns by value, unit of duration: month-person.
 1377      * Also see {@link #createMonthPerson()}.
 1378      * @stable ICU 64
 1379      */
 1380     static MeasureUnit getMonthPerson();
 1381 
 1382     /**
 1383      * Returns by pointer, unit of duration: nanosecond.
 1384      * Caller owns returned value and must free it.
 1385      * Also see {@link #getNanosecond()}.
 1386      * @param status ICU error code.
 1387      * @stable ICU 54
 1388      */
 1389     static MeasureUnit *createNanosecond(UErrorCode &status);
 1390 
 1391     /**
 1392      * Returns by value, unit of duration: nanosecond.
 1393      * Also see {@link #createNanosecond()}.
 1394      * @stable ICU 64
 1395      */
 1396     static MeasureUnit getNanosecond();
 1397 
 1398     /**
 1399      * Returns by pointer, unit of duration: second.
 1400      * Caller owns returned value and must free it.
 1401      * Also see {@link #getSecond()}.
 1402      * @param status ICU error code.
 1403      * @stable ICU 53
 1404      */
 1405     static MeasureUnit *createSecond(UErrorCode &status);
 1406 
 1407     /**
 1408      * Returns by value, unit of duration: second.
 1409      * Also see {@link #createSecond()}.
 1410      * @stable ICU 64
 1411      */
 1412     static MeasureUnit getSecond();
 1413 
 1414     /**
 1415      * Returns by pointer, unit of duration: week.
 1416      * Caller owns returned value and must free it.
 1417      * Also see {@link #getWeek()}.
 1418      * @param status ICU error code.
 1419      * @stable ICU 53
 1420      */
 1421     static MeasureUnit *createWeek(UErrorCode &status);
 1422 
 1423     /**
 1424      * Returns by value, unit of duration: week.
 1425      * Also see {@link #createWeek()}.
 1426      * @stable ICU 64
 1427      */
 1428     static MeasureUnit getWeek();
 1429 
 1430     /**
 1431      * Returns by pointer, unit of duration: week-person.
 1432      * Caller owns returned value and must free it.
 1433      * Also see {@link #getWeekPerson()}.
 1434      * @param status ICU error code.
 1435      * @stable ICU 64
 1436      */
 1437     static MeasureUnit *createWeekPerson(UErrorCode &status);
 1438 
 1439     /**
 1440      * Returns by value, unit of duration: week-person.
 1441      * Also see {@link #createWeekPerson()}.
 1442      * @stable ICU 64
 1443      */
 1444     static MeasureUnit getWeekPerson();
 1445 
 1446     /**
 1447      * Returns by pointer, unit of duration: year.
 1448      * Caller owns returned value and must free it.
 1449      * Also see {@link #getYear()}.
 1450      * @param status ICU error code.
 1451      * @stable ICU 53
 1452      */
 1453     static MeasureUnit *createYear(UErrorCode &status);
 1454 
 1455     /**
 1456      * Returns by value, unit of duration: year.
 1457      * Also see {@link #createYear()}.
 1458      * @stable ICU 64
 1459      */
 1460     static MeasureUnit getYear();
 1461 
 1462     /**
 1463      * Returns by pointer, unit of duration: year-person.
 1464      * Caller owns returned value and must free it.
 1465      * Also see {@link #getYearPerson()}.
 1466      * @param status ICU error code.
 1467      * @stable ICU 64
 1468      */
 1469     static MeasureUnit *createYearPerson(UErrorCode &status);
 1470 
 1471     /**
 1472      * Returns by value, unit of duration: year-person.
 1473      * Also see {@link #createYearPerson()}.
 1474      * @stable ICU 64
 1475      */
 1476     static MeasureUnit getYearPerson();
 1477 
 1478     /**
 1479      * Returns by pointer, unit of electric: ampere.
 1480      * Caller owns returned value and must free it.
 1481      * Also see {@link #getAmpere()}.
 1482      * @param status ICU error code.
 1483      * @stable ICU 54
 1484      */
 1485     static MeasureUnit *createAmpere(UErrorCode &status);
 1486 
 1487     /**
 1488      * Returns by value, unit of electric: ampere.
 1489      * Also see {@link #createAmpere()}.
 1490      * @stable ICU 64
 1491      */
 1492     static MeasureUnit getAmpere();
 1493 
 1494     /**
 1495      * Returns by pointer, unit of electric: milliampere.
 1496      * Caller owns returned value and must free it.
 1497      * Also see {@link #getMilliampere()}.
 1498      * @param status ICU error code.
 1499      * @stable ICU 54
 1500      */
 1501     static MeasureUnit *createMilliampere(UErrorCode &status);
 1502 
 1503     /**
 1504      * Returns by value, unit of electric: milliampere.
 1505      * Also see {@link #createMilliampere()}.
 1506      * @stable ICU 64
 1507      */
 1508     static MeasureUnit getMilliampere();
 1509 
 1510     /**
 1511      * Returns by pointer, unit of electric: ohm.
 1512      * Caller owns returned value and must free it.
 1513      * Also see {@link #getOhm()}.
 1514      * @param status ICU error code.
 1515      * @stable ICU 54
 1516      */
 1517     static MeasureUnit *createOhm(UErrorCode &status);
 1518 
 1519     /**
 1520      * Returns by value, unit of electric: ohm.
 1521      * Also see {@link #createOhm()}.
 1522      * @stable ICU 64
 1523      */
 1524     static MeasureUnit getOhm();
 1525 
 1526     /**
 1527      * Returns by pointer, unit of electric: volt.
 1528      * Caller owns returned value and must free it.
 1529      * Also see {@link #getVolt()}.
 1530      * @param status ICU error code.
 1531      * @stable ICU 54
 1532      */
 1533     static MeasureUnit *createVolt(UErrorCode &status);
 1534 
 1535     /**
 1536      * Returns by value, unit of electric: volt.
 1537      * Also see {@link #createVolt()}.
 1538      * @stable ICU 64
 1539      */
 1540     static MeasureUnit getVolt();
 1541 
 1542     /**
 1543      * Returns by pointer, unit of energy: british-thermal-unit.
 1544      * Caller owns returned value and must free it.
 1545      * Also see {@link #getBritishThermalUnit()}.
 1546      * @param status ICU error code.
 1547      * @stable ICU 64
 1548      */
 1549     static MeasureUnit *createBritishThermalUnit(UErrorCode &status);
 1550 
 1551     /**
 1552      * Returns by value, unit of energy: british-thermal-unit.
 1553      * Also see {@link #createBritishThermalUnit()}.
 1554      * @stable ICU 64
 1555      */
 1556     static MeasureUnit getBritishThermalUnit();
 1557 
 1558     /**
 1559      * Returns by pointer, unit of energy: calorie.
 1560      * Caller owns returned value and must free it.
 1561      * Also see {@link #getCalorie()}.
 1562      * @param status ICU error code.
 1563      * @stable ICU 54
 1564      */
 1565     static MeasureUnit *createCalorie(UErrorCode &status);
 1566 
 1567     /**
 1568      * Returns by value, unit of energy: calorie.
 1569      * Also see {@link #createCalorie()}.
 1570      * @stable ICU 64
 1571      */
 1572     static MeasureUnit getCalorie();
 1573 
 1574     /**
 1575      * Returns by pointer, unit of energy: electronvolt.
 1576      * Caller owns returned value and must free it.
 1577      * Also see {@link #getElectronvolt()}.
 1578      * @param status ICU error code.
 1579      * @stable ICU 64
 1580      */
 1581     static MeasureUnit *createElectronvolt(UErrorCode &status);
 1582 
 1583     /**
 1584      * Returns by value, unit of energy: electronvolt.
 1585      * Also see {@link #createElectronvolt()}.
 1586      * @stable ICU 64
 1587      */
 1588     static MeasureUnit getElectronvolt();
 1589 
 1590     /**
 1591      * Returns by pointer, unit of energy: foodcalorie.
 1592      * Caller owns returned value and must free it.
 1593      * Also see {@link #getFoodcalorie()}.
 1594      * @param status ICU error code.
 1595      * @stable ICU 54
 1596      */
 1597     static MeasureUnit *createFoodcalorie(UErrorCode &status);
 1598 
 1599     /**
 1600      * Returns by value, unit of energy: foodcalorie.
 1601      * Also see {@link #createFoodcalorie()}.
 1602      * @stable ICU 64
 1603      */
 1604     static MeasureUnit getFoodcalorie();
 1605 
 1606     /**
 1607      * Returns by pointer, unit of energy: joule.
 1608      * Caller owns returned value and must free it.
 1609      * Also see {@link #getJoule()}.
 1610      * @param status ICU error code.
 1611      * @stable ICU 54
 1612      */
 1613     static MeasureUnit *createJoule(UErrorCode &status);
 1614 
 1615     /**
 1616      * Returns by value, unit of energy: joule.
 1617      * Also see {@link #createJoule()}.
 1618      * @stable ICU 64
 1619      */
 1620     static MeasureUnit getJoule();
 1621 
 1622     /**
 1623      * Returns by pointer, unit of energy: kilocalorie.
 1624      * Caller owns returned value and must free it.
 1625      * Also see {@link #getKilocalorie()}.
 1626      * @param status ICU error code.
 1627      * @stable ICU 54
 1628      */
 1629     static MeasureUnit *createKilocalorie(UErrorCode &status);
 1630 
 1631     /**
 1632      * Returns by value, unit of energy: kilocalorie.
 1633      * Also see {@link #createKilocalorie()}.
 1634      * @stable ICU 64
 1635      */
 1636     static MeasureUnit getKilocalorie();
 1637 
 1638     /**
 1639      * Returns by pointer, unit of energy: kilojoule.
 1640      * Caller owns returned value and must free it.
 1641      * Also see {@link #getKilojoule()}.
 1642      * @param status ICU error code.
 1643      * @stable ICU 54
 1644      */
 1645     static MeasureUnit *createKilojoule(UErrorCode &status);
 1646 
 1647     /**
 1648      * Returns by value, unit of energy: kilojoule.
 1649      * Also see {@link #createKilojoule()}.
 1650      * @stable ICU 64
 1651      */
 1652     static MeasureUnit getKilojoule();
 1653 
 1654     /**
 1655      * Returns by pointer, unit of energy: kilowatt-hour.
 1656      * Caller owns returned value and must free it.
 1657      * Also see {@link #getKilowattHour()}.
 1658      * @param status ICU error code.
 1659      * @stable ICU 54
 1660      */
 1661     static MeasureUnit *createKilowattHour(UErrorCode &status);
 1662 
 1663     /**
 1664      * Returns by value, unit of energy: kilowatt-hour.
 1665      * Also see {@link #createKilowattHour()}.
 1666      * @stable ICU 64
 1667      */
 1668     static MeasureUnit getKilowattHour();
 1669 
 1670 #ifndef U_HIDE_DRAFT_API
 1671     /**
 1672      * Returns by pointer, unit of energy: therm-us.
 1673      * Caller owns returned value and must free it.
 1674      * Also see {@link #getThermUs()}.
 1675      * @param status ICU error code.
 1676      * @draft ICU 65
 1677      */
 1678     static MeasureUnit *createThermUs(UErrorCode &status);
 1679 
 1680     /**
 1681      * Returns by value, unit of energy: therm-us.
 1682      * Also see {@link #createThermUs()}.
 1683      * @draft ICU 65
 1684      */
 1685     static MeasureUnit getThermUs();
 1686 #endif /* U_HIDE_DRAFT_API */
 1687 
 1688     /**
 1689      * Returns by pointer, unit of force: newton.
 1690      * Caller owns returned value and must free it.
 1691      * Also see {@link #getNewton()}.
 1692      * @param status ICU error code.
 1693      * @stable ICU 64
 1694      */
 1695     static MeasureUnit *createNewton(UErrorCode &status);
 1696 
 1697     /**
 1698      * Returns by value, unit of force: newton.
 1699      * Also see {@link #createNewton()}.
 1700      * @stable ICU 64
 1701      */
 1702     static MeasureUnit getNewton();
 1703 
 1704     /**
 1705      * Returns by pointer, unit of force: pound-force.
 1706      * Caller owns returned value and must free it.
 1707      * Also see {@link #getPoundForce()}.
 1708      * @param status ICU error code.
 1709      * @stable ICU 64
 1710      */
 1711     static MeasureUnit *createPoundForce(UErrorCode &status);
 1712 
 1713     /**
 1714      * Returns by value, unit of force: pound-force.
 1715      * Also see {@link #createPoundForce()}.
 1716      * @stable ICU 64
 1717      */
 1718     static MeasureUnit getPoundForce();
 1719 
 1720     /**
 1721      * Returns by pointer, unit of frequency: gigahertz.
 1722      * Caller owns returned value and must free it.
 1723      * Also see {@link #getGigahertz()}.
 1724      * @param status ICU error code.
 1725      * @stable ICU 54
 1726      */
 1727     static MeasureUnit *createGigahertz(UErrorCode &status);
 1728 
 1729     /**
 1730      * Returns by value, unit of frequency: gigahertz.
 1731      * Also see {@link #createGigahertz()}.
 1732      * @stable ICU 64
 1733      */
 1734     static MeasureUnit getGigahertz();
 1735 
 1736     /**
 1737      * Returns by pointer, unit of frequency: hertz.
 1738      * Caller owns returned value and must free it.
 1739      * Also see {@link #getHertz()}.
 1740      * @param status ICU error code.
 1741      * @stable ICU 54
 1742      */
 1743     static MeasureUnit *createHertz(UErrorCode &status);
 1744 
 1745     /**
 1746      * Returns by value, unit of frequency: hertz.
 1747      * Also see {@link #createHertz()}.
 1748      * @stable ICU 64
 1749      */
 1750     static MeasureUnit getHertz();
 1751 
 1752     /**
 1753      * Returns by pointer, unit of frequency: kilohertz.
 1754      * Caller owns returned value and must free it.
 1755      * Also see {@link #getKilohertz()}.
 1756      * @param status ICU error code.
 1757      * @stable ICU 54
 1758      */
 1759     static MeasureUnit *createKilohertz(UErrorCode &status);
 1760 
 1761     /**
 1762      * Returns by value, unit of frequency: kilohertz.
 1763      * Also see {@link #createKilohertz()}.
 1764      * @stable ICU 64
 1765      */
 1766     static MeasureUnit getKilohertz();
 1767 
 1768     /**
 1769      * Returns by pointer, unit of frequency: megahertz.
 1770      * Caller owns returned value and must free it.
 1771      * Also see {@link #getMegahertz()}.
 1772      * @param status ICU error code.
 1773      * @stable ICU 54
 1774      */
 1775     static MeasureUnit *createMegahertz(UErrorCode &status);
 1776 
 1777     /**
 1778      * Returns by value, unit of frequency: megahertz.
 1779      * Also see {@link #createMegahertz()}.
 1780      * @stable ICU 64
 1781      */
 1782     static MeasureUnit getMegahertz();
 1783 
 1784 #ifndef U_HIDE_DRAFT_API
 1785     /**
 1786      * Returns by pointer, unit of graphics: dot-per-centimeter.
 1787      * Caller owns returned value and must free it.
 1788      * Also see {@link #getDotPerCentimeter()}.
 1789      * @param status ICU error code.
 1790      * @draft ICU 65
 1791      */
 1792     static MeasureUnit *createDotPerCentimeter(UErrorCode &status);
 1793 
 1794     /**
 1795      * Returns by value, unit of graphics: dot-per-centimeter.
 1796      * Also see {@link #createDotPerCentimeter()}.
 1797      * @draft ICU 65
 1798      */
 1799     static MeasureUnit getDotPerCentimeter();
 1800 #endif /* U_HIDE_DRAFT_API */
 1801 
 1802 #ifndef U_HIDE_DRAFT_API
 1803     /**
 1804      * Returns by pointer, unit of graphics: dot-per-inch.
 1805      * Caller owns returned value and must free it.
 1806      * Also see {@link #getDotPerInch()}.
 1807      * @param status ICU error code.
 1808      * @draft ICU 65
 1809      */
 1810     static MeasureUnit *createDotPerInch(UErrorCode &status);
 1811 
 1812     /**
 1813      * Returns by value, unit of graphics: dot-per-inch.
 1814      * Also see {@link #createDotPerInch()}.
 1815      * @draft ICU 65
 1816      */
 1817     static MeasureUnit getDotPerInch();
 1818 #endif /* U_HIDE_DRAFT_API */
 1819 
 1820 #ifndef U_HIDE_DRAFT_API
 1821     /**
 1822      * Returns by pointer, unit of graphics: em.
 1823      * Caller owns returned value and must free it.
 1824      * Also see {@link #getEm()}.
 1825      * @param status ICU error code.
 1826      * @draft ICU 65
 1827      */
 1828     static MeasureUnit *createEm(UErrorCode &status);
 1829 
 1830     /**
 1831      * Returns by value, unit of graphics: em.
 1832      * Also see {@link #createEm()}.
 1833      * @draft ICU 65
 1834      */
 1835     static MeasureUnit getEm();
 1836 #endif /* U_HIDE_DRAFT_API */
 1837 
 1838 #ifndef U_HIDE_DRAFT_API
 1839     /**
 1840      * Returns by pointer, unit of graphics: megapixel.
 1841      * Caller owns returned value and must free it.
 1842      * Also see {@link #getMegapixel()}.
 1843      * @param status ICU error code.
 1844      * @draft ICU 65
 1845      */
 1846     static MeasureUnit *createMegapixel(UErrorCode &status);
 1847 
 1848     /**
 1849      * Returns by value, unit of graphics: megapixel.
 1850      * Also see {@link #createMegapixel()}.
 1851      * @draft ICU 65
 1852      */
 1853     static MeasureUnit getMegapixel();
 1854 #endif /* U_HIDE_DRAFT_API */
 1855 
 1856 #ifndef U_HIDE_DRAFT_API
 1857     /**
 1858      * Returns by pointer, unit of graphics: pixel.
 1859      * Caller owns returned value and must free it.
 1860      * Also see {@link #getPixel()}.
 1861      * @param status ICU error code.
 1862      * @draft ICU 65
 1863      */
 1864     static MeasureUnit *createPixel(UErrorCode &status);
 1865 
 1866     /**
 1867      * Returns by value, unit of graphics: pixel.
 1868      * Also see {@link #createPixel()}.
 1869      * @draft ICU 65
 1870      */
 1871     static MeasureUnit getPixel();
 1872 #endif /* U_HIDE_DRAFT_API */
 1873 
 1874 #ifndef U_HIDE_DRAFT_API
 1875     /**
 1876      * Returns by pointer, unit of graphics: pixel-per-centimeter.
 1877      * Caller owns returned value and must free it.
 1878      * Also see {@link #getPixelPerCentimeter()}.
 1879      * @param status ICU error code.
 1880      * @draft ICU 65
 1881      */
 1882     static MeasureUnit *createPixelPerCentimeter(UErrorCode &status);
 1883 
 1884     /**
 1885      * Returns by value, unit of graphics: pixel-per-centimeter.
 1886      * Also see {@link #createPixelPerCentimeter()}.
 1887      * @draft ICU 65
 1888      */
 1889     static MeasureUnit getPixelPerCentimeter();
 1890 #endif /* U_HIDE_DRAFT_API */
 1891 
 1892 #ifndef U_HIDE_DRAFT_API
 1893     /**
 1894      * Returns by pointer, unit of graphics: pixel-per-inch.
 1895      * Caller owns returned value and must free it.
 1896      * Also see {@link #getPixelPerInch()}.
 1897      * @param status ICU error code.
 1898      * @draft ICU 65
 1899      */
 1900     static MeasureUnit *createPixelPerInch(UErrorCode &status);
 1901 
 1902     /**
 1903      * Returns by value, unit of graphics: pixel-per-inch.
 1904      * Also see {@link #createPixelPerInch()}.
 1905      * @draft ICU 65
 1906      */
 1907     static MeasureUnit getPixelPerInch();
 1908 #endif /* U_HIDE_DRAFT_API */
 1909 
 1910     /**
 1911      * Returns by pointer, unit of length: astronomical-unit.
 1912      * Caller owns returned value and must free it.
 1913      * Also see {@link #getAstronomicalUnit()}.
 1914      * @param status ICU error code.
 1915      * @stable ICU 54
 1916      */
 1917     static MeasureUnit *createAstronomicalUnit(UErrorCode &status);
 1918 
 1919     /**
 1920      * Returns by value, unit of length: astronomical-unit.
 1921      * Also see {@link #createAstronomicalUnit()}.
 1922      * @stable ICU 64
 1923      */
 1924     static MeasureUnit getAstronomicalUnit();
 1925 
 1926     /**
 1927      * Returns by pointer, unit of length: centimeter.
 1928      * Caller owns returned value and must free it.
 1929      * Also see {@link #getCentimeter()}.
 1930      * @param status ICU error code.
 1931      * @stable ICU 53
 1932      */
 1933     static MeasureUnit *createCentimeter(UErrorCode &status);
 1934 
 1935     /**
 1936      * Returns by value, unit of length: centimeter.
 1937      * Also see {@link #createCentimeter()}.
 1938      * @stable ICU 64
 1939      */
 1940     static MeasureUnit getCentimeter();
 1941 
 1942     /**
 1943      * Returns by pointer, unit of length: decimeter.
 1944      * Caller owns returned value and must free it.
 1945      * Also see {@link #getDecimeter()}.
 1946      * @param status ICU error code.
 1947      * @stable ICU 54
 1948      */
 1949     static MeasureUnit *createDecimeter(UErrorCode &status);
 1950 
 1951     /**
 1952      * Returns by value, unit of length: decimeter.
 1953      * Also see {@link #createDecimeter()}.
 1954      * @stable ICU 64
 1955      */
 1956     static MeasureUnit getDecimeter();
 1957 
 1958     /**
 1959      * Returns by pointer, unit of length: fathom.
 1960      * Caller owns returned value and must free it.
 1961      * Also see {@link #getFathom()}.
 1962      * @param status ICU error code.
 1963      * @stable ICU 54
 1964      */
 1965     static MeasureUnit *createFathom(UErrorCode &status);
 1966 
 1967     /**
 1968      * Returns by value, unit of length: fathom.
 1969      * Also see {@link #createFathom()}.
 1970      * @stable ICU 64
 1971      */
 1972     static MeasureUnit getFathom();
 1973 
 1974     /**
 1975      * Returns by pointer, unit of length: foot.
 1976      * Caller owns returned value and must free it.
 1977      * Also see {@link #getFoot()}.
 1978      * @param status ICU error code.
 1979      * @stable ICU 53
 1980      */
 1981     static MeasureUnit *createFoot(UErrorCode &status);
 1982 
 1983     /**
 1984      * Returns by value, unit of length: foot.
 1985      * Also see {@link #createFoot()}.
 1986      * @stable ICU 64
 1987      */
 1988     static MeasureUnit getFoot();
 1989 
 1990     /**
 1991      * Returns by pointer, unit of length: furlong.
 1992      * Caller owns returned value and must free it.
 1993      * Also see {@link #getFurlong()}.
 1994      * @param status ICU error code.
 1995      * @stable ICU 54
 1996      */
 1997     static MeasureUnit *createFurlong(UErrorCode &status);
 1998 
 1999     /**
 2000      * Returns by value, unit of length: furlong.
 2001      * Also see {@link #createFurlong()}.
 2002      * @stable ICU 64
 2003      */
 2004     static MeasureUnit getFurlong();
 2005 
 2006     /**
 2007      * Returns by pointer, unit of length: inch.
 2008      * Caller owns returned value and must free it.
 2009      * Also see {@link #getInch()}.
 2010      * @param status ICU error code.
 2011      * @stable ICU 53
 2012      */
 2013     static MeasureUnit *createInch(UErrorCode &status);
 2014 
 2015     /**
 2016      * Returns by value, unit of length: inch.
 2017      * Also see {@link #createInch()}.
 2018      * @stable ICU 64
 2019      */
 2020     static MeasureUnit getInch();
 2021 
 2022     /**
 2023      * Returns by pointer, unit of length: kilometer.
 2024      * Caller owns returned value and must free it.
 2025      * Also see {@link #getKilometer()}.
 2026      * @param status ICU error code.
 2027      * @stable ICU 53
 2028      */
 2029     static MeasureUnit *createKilometer(UErrorCode &status);
 2030 
 2031     /**
 2032      * Returns by value, unit of length: kilometer.
 2033      * Also see {@link #createKilometer()}.
 2034      * @stable ICU 64
 2035      */
 2036     static MeasureUnit getKilometer();
 2037 
 2038     /**
 2039      * Returns by pointer, unit of length: light-year.
 2040      * Caller owns returned value and must free it.
 2041      * Also see {@link #getLightYear()}.
 2042      * @param status ICU error code.
 2043      * @stable ICU 53
 2044      */
 2045     static MeasureUnit *createLightYear(UErrorCode &status);
 2046 
 2047     /**
 2048      * Returns by value, unit of length: light-year.
 2049      * Also see {@link #createLightYear()}.
 2050      * @stable ICU 64
 2051      */
 2052     static MeasureUnit getLightYear();
 2053 
 2054     /**
 2055      * Returns by pointer, unit of length: meter.
 2056      * Caller owns returned value and must free it.
 2057      * Also see {@link #getMeter()}.
 2058      * @param status ICU error code.
 2059      * @stable ICU 53
 2060      */
 2061     static MeasureUnit *createMeter(UErrorCode &status);
 2062 
 2063     /**
 2064      * Returns by value, unit of length: meter.
 2065      * Also see {@link #createMeter()}.
 2066      * @stable ICU 64
 2067      */
 2068     static MeasureUnit getMeter();
 2069 
 2070     /**
 2071      * Returns by pointer, unit of length: micrometer.
 2072      * Caller owns returned value and must free it.
 2073      * Also see {@link #getMicrometer()}.
 2074      * @param status ICU error code.
 2075      * @stable ICU 54
 2076      */
 2077     static MeasureUnit *createMicrometer(UErrorCode &status);
 2078 
 2079     /**
 2080      * Returns by value, unit of length: micrometer.
 2081      * Also see {@link #createMicrometer()}.
 2082      * @stable ICU 64
 2083      */
 2084     static MeasureUnit getMicrometer();
 2085 
 2086     /**
 2087      * Returns by pointer, unit of length: mile.
 2088      * Caller owns returned value and must free it.
 2089      * Also see {@link #getMile()}.
 2090      * @param status ICU error code.
 2091      * @stable ICU 53
 2092      */
 2093     static MeasureUnit *createMile(UErrorCode &status);
 2094 
 2095     /**
 2096      * Returns by value, unit of length: mile.
 2097      * Also see {@link #createMile()}.
 2098      * @stable ICU 64
 2099      */
 2100     static MeasureUnit getMile();
 2101 
 2102     /**
 2103      * Returns by pointer, unit of length: mile-scandinavian.
 2104      * Caller owns returned value and must free it.
 2105      * Also see {@link #getMileScandinavian()}.
 2106      * @param status ICU error code.
 2107      * @stable ICU 56
 2108      */
 2109     static MeasureUnit *createMileScandinavian(UErrorCode &status);
 2110 
 2111     /**
 2112      * Returns by value, unit of length: mile-scandinavian.
 2113      * Also see {@link #createMileScandinavian()}.
 2114      * @stable ICU 64
 2115      */
 2116     static MeasureUnit getMileScandinavian();
 2117 
 2118     /**
 2119      * Returns by pointer, unit of length: millimeter.
 2120      * Caller owns returned value and must free it.
 2121      * Also see {@link #getMillimeter()}.
 2122      * @param status ICU error code.
 2123      * @stable ICU 53
 2124      */
 2125     static MeasureUnit *createMillimeter(UErrorCode &status);
 2126 
 2127     /**
 2128      * Returns by value, unit of length: millimeter.
 2129      * Also see {@link #createMillimeter()}.
 2130      * @stable ICU 64
 2131      */
 2132     static MeasureUnit getMillimeter();
 2133 
 2134     /**
 2135      * Returns by pointer, unit of length: nanometer.
 2136      * Caller owns returned value and must free it.
 2137      * Also see {@link #getNanometer()}.
 2138      * @param status ICU error code.
 2139      * @stable ICU 54
 2140      */
 2141     static MeasureUnit *createNanometer(UErrorCode &status);
 2142 
 2143     /**
 2144      * Returns by value, unit of length: nanometer.
 2145      * Also see {@link #createNanometer()}.
 2146      * @stable ICU 64
 2147      */
 2148     static MeasureUnit getNanometer();
 2149 
 2150     /**
 2151      * Returns by pointer, unit of length: nautical-mile.
 2152      * Caller owns returned value and must free it.
 2153      * Also see {@link #getNauticalMile()}.
 2154      * @param status ICU error code.
 2155      * @stable ICU 54
 2156      */
 2157     static MeasureUnit *createNauticalMile(UErrorCode &status);
 2158 
 2159     /**
 2160      * Returns by value, unit of length: nautical-mile.
 2161      * Also see {@link #createNauticalMile()}.
 2162      * @stable ICU 64
 2163      */
 2164     static MeasureUnit getNauticalMile();
 2165 
 2166     /**
 2167      * Returns by pointer, unit of length: parsec.
 2168      * Caller owns returned value and must free it.
 2169      * Also see {@link #getParsec()}.
 2170      * @param status ICU error code.
 2171      * @stable ICU 54
 2172      */
 2173     static MeasureUnit *createParsec(UErrorCode &status);
 2174 
 2175     /**
 2176      * Returns by value, unit of length: parsec.
 2177      * Also see {@link #createParsec()}.
 2178      * @stable ICU 64
 2179      */
 2180     static MeasureUnit getParsec();
 2181 
 2182     /**
 2183      * Returns by pointer, unit of length: picometer.
 2184      * Caller owns returned value and must free it.
 2185      * Also see {@link #getPicometer()}.
 2186      * @param status ICU error code.
 2187      * @stable ICU 53
 2188      */
 2189     static MeasureUnit *createPicometer(UErrorCode &status);
 2190 
 2191     /**
 2192      * Returns by value, unit of length: picometer.
 2193      * Also see {@link #createPicometer()}.
 2194      * @stable ICU 64
 2195      */
 2196     static MeasureUnit getPicometer();
 2197 
 2198     /**
 2199      * Returns by pointer, unit of length: point.
 2200      * Caller owns returned value and must free it.
 2201      * Also see {@link #getPoint()}.
 2202      * @param status ICU error code.
 2203      * @stable ICU 59
 2204      */
 2205     static MeasureUnit *createPoint(UErrorCode &status);
 2206 
 2207     /**
 2208      * Returns by value, unit of length: point.
 2209      * Also see {@link #createPoint()}.
 2210      * @stable ICU 64
 2211      */
 2212     static MeasureUnit getPoint();
 2213 
 2214     /**
 2215      * Returns by pointer, unit of length: solar-radius.
 2216      * Caller owns returned value and must free it.
 2217      * Also see {@link #getSolarRadius()}.
 2218      * @param status ICU error code.
 2219      * @stable ICU 64
 2220      */
 2221     static MeasureUnit *createSolarRadius(UErrorCode &status);
 2222 
 2223     /**
 2224      * Returns by value, unit of length: solar-radius.
 2225      * Also see {@link #createSolarRadius()}.
 2226      * @stable ICU 64
 2227      */
 2228     static MeasureUnit getSolarRadius();
 2229 
 2230     /**
 2231      * Returns by pointer, unit of length: yard.
 2232      * Caller owns returned value and must free it.
 2233      * Also see {@link #getYard()}.
 2234      * @param status ICU error code.
 2235      * @stable ICU 53
 2236      */
 2237     static MeasureUnit *createYard(UErrorCode &status);
 2238 
 2239     /**
 2240      * Returns by value, unit of length: yard.
 2241      * Also see {@link #createYard()}.
 2242      * @stable ICU 64
 2243      */
 2244     static MeasureUnit getYard();
 2245 
 2246     /**
 2247      * Returns by pointer, unit of light: lux.
 2248      * Caller owns returned value and must free it.
 2249      * Also see {@link #getLux()}.
 2250      * @param status ICU error code.
 2251      * @stable ICU 54
 2252      */
 2253     static MeasureUnit *createLux(UErrorCode &status);
 2254 
 2255     /**
 2256      * Returns by value, unit of light: lux.
 2257      * Also see {@link #createLux()}.
 2258      * @stable ICU 64
 2259      */
 2260     static MeasureUnit getLux();
 2261 
 2262     /**
 2263      * Returns by pointer, unit of light: solar-luminosity.
 2264      * Caller owns returned value and must free it.
 2265      * Also see {@link #getSolarLuminosity()}.
 2266      * @param status ICU error code.
 2267      * @stable ICU 64
 2268      */
 2269     static MeasureUnit *createSolarLuminosity(UErrorCode &status);
 2270 
 2271     /**
 2272      * Returns by value, unit of light: solar-luminosity.
 2273      * Also see {@link #createSolarLuminosity()}.
 2274      * @stable ICU 64
 2275      */
 2276     static MeasureUnit getSolarLuminosity();
 2277 
 2278     /**
 2279      * Returns by pointer, unit of mass: carat.
 2280      * Caller owns returned value and must free it.
 2281      * Also see {@link #getCarat()}.
 2282      * @param status ICU error code.
 2283      * @stable ICU 54
 2284      */
 2285     static MeasureUnit *createCarat(UErrorCode &status);
 2286 
 2287     /**
 2288      * Returns by value, unit of mass: carat.
 2289      * Also see {@link #createCarat()}.
 2290      * @stable ICU 64
 2291      */
 2292     static MeasureUnit getCarat();
 2293 
 2294     /**
 2295      * Returns by pointer, unit of mass: dalton.
 2296      * Caller owns returned value and must free it.
 2297      * Also see {@link #getDalton()}.
 2298      * @param status ICU error code.
 2299      * @stable ICU 64
 2300      */
 2301     static MeasureUnit *createDalton(UErrorCode &status);
 2302 
 2303     /**
 2304      * Returns by value, unit of mass: dalton.
 2305      * Also see {@link #createDalton()}.
 2306      * @stable ICU 64
 2307      */
 2308     static MeasureUnit getDalton();
 2309 
 2310     /**
 2311      * Returns by pointer, unit of mass: earth-mass.
 2312      * Caller owns returned value and must free it.
 2313      * Also see {@link #getEarthMass()}.
 2314      * @param status ICU error code.
 2315      * @stable ICU 64
 2316      */
 2317     static MeasureUnit *createEarthMass(UErrorCode &status);
 2318 
 2319     /**
 2320      * Returns by value, unit of mass: earth-mass.
 2321      * Also see {@link #createEarthMass()}.
 2322      * @stable ICU 64
 2323      */
 2324     static MeasureUnit getEarthMass();
 2325 
 2326     /**
 2327      * Returns by pointer, unit of mass: gram.
 2328      * Caller owns returned value and must free it.
 2329      * Also see {@link #getGram()}.
 2330      * @param status ICU error code.
 2331      * @stable ICU 53
 2332      */
 2333     static MeasureUnit *createGram(UErrorCode &status);
 2334 
 2335     /**
 2336      * Returns by value, unit of mass: gram.
 2337      * Also see {@link #createGram()}.
 2338      * @stable ICU 64
 2339      */
 2340     static MeasureUnit getGram();
 2341 
 2342     /**
 2343      * Returns by pointer, unit of mass: kilogram.
 2344      * Caller owns returned value and must free it.
 2345      * Also see {@link #getKilogram()}.
 2346      * @param status ICU error code.
 2347      * @stable ICU 53
 2348      */
 2349     static MeasureUnit *createKilogram(UErrorCode &status);
 2350 
 2351     /**
 2352      * Returns by value, unit of mass: kilogram.
 2353      * Also see {@link #createKilogram()}.
 2354      * @stable ICU 64
 2355      */
 2356     static MeasureUnit getKilogram();
 2357 
 2358     /**
 2359      * Returns by pointer, unit of mass: metric-ton.
 2360      * Caller owns returned value and must free it.
 2361      * Also see {@link #getMetricTon()}.
 2362      * @param status ICU error code.
 2363      * @stable ICU 54
 2364      */
 2365     static MeasureUnit *createMetricTon(UErrorCode &status);
 2366 
 2367     /**
 2368      * Returns by value, unit of mass: metric-ton.
 2369      * Also see {@link #createMetricTon()}.
 2370      * @stable ICU 64
 2371      */
 2372     static MeasureUnit getMetricTon();
 2373 
 2374     /**
 2375      * Returns by pointer, unit of mass: microgram.
 2376      * Caller owns returned value and must free it.
 2377      * Also see {@link #getMicrogram()}.
 2378      * @param status ICU error code.
 2379      * @stable ICU 54
 2380      */
 2381     static MeasureUnit *createMicrogram(UErrorCode &status);
 2382 
 2383     /**
 2384      * Returns by value, unit of mass: microgram.
 2385      * Also see {@link #createMicrogram()}.
 2386      * @stable ICU 64
 2387      */
 2388     static MeasureUnit getMicrogram();
 2389 
 2390     /**
 2391      * Returns by pointer, unit of mass: milligram.
 2392      * Caller owns returned value and must free it.
 2393      * Also see {@link #getMilligram()}.
 2394      * @param status ICU error code.
 2395      * @stable ICU 54
 2396      */
 2397     static MeasureUnit *createMilligram(UErrorCode &status);
 2398 
 2399     /**
 2400      * Returns by value, unit of mass: milligram.
 2401      * Also see {@link #createMilligram()}.
 2402      * @stable ICU 64
 2403      */
 2404     static MeasureUnit getMilligram();
 2405 
 2406     /**
 2407      * Returns by pointer, unit of mass: ounce.
 2408      * Caller owns returned value and must free it.
 2409      * Also see {@link #getOunce()}.
 2410      * @param status ICU error code.
 2411      * @stable ICU 53
 2412      */
 2413     static MeasureUnit *createOunce(UErrorCode &status);
 2414 
 2415     /**
 2416      * Returns by value, unit of mass: ounce.
 2417      * Also see {@link #createOunce()}.
 2418      * @stable ICU 64
 2419      */
 2420     static MeasureUnit getOunce();
 2421 
 2422     /**
 2423      * Returns by pointer, unit of mass: ounce-troy.
 2424      * Caller owns returned value and must free it.
 2425      * Also see {@link #getOunceTroy()}.
 2426      * @param status ICU error code.
 2427      * @stable ICU 54
 2428      */
 2429     static MeasureUnit *createOunceTroy(UErrorCode &status);
 2430 
 2431     /**
 2432      * Returns by value, unit of mass: ounce-troy.
 2433      * Also see {@link #createOunceTroy()}.
 2434      * @stable ICU 64
 2435      */
 2436     static MeasureUnit getOunceTroy();
 2437 
 2438     /**
 2439      * Returns by pointer, unit of mass: pound.
 2440      * Caller owns returned value and must free it.
 2441      * Also see {@link #getPound()}.
 2442      * @param status ICU error code.
 2443      * @stable ICU 53
 2444      */
 2445     static MeasureUnit *createPound(UErrorCode &status);
 2446 
 2447     /**
 2448      * Returns by value, unit of mass: pound.
 2449      * Also see {@link #createPound()}.
 2450      * @stable ICU 64
 2451      */
 2452     static MeasureUnit getPound();
 2453 
 2454     /**
 2455      * Returns by pointer, unit of mass: solar-mass.
 2456      * Caller owns returned value and must free it.
 2457      * Also see {@link #getSolarMass()}.
 2458      * @param status ICU error code.
 2459      * @stable ICU 64
 2460      */
 2461     static MeasureUnit *createSolarMass(UErrorCode &status);
 2462 
 2463     /**
 2464      * Returns by value, unit of mass: solar-mass.
 2465      * Also see {@link #createSolarMass()}.
 2466      * @stable ICU 64
 2467      */
 2468     static MeasureUnit getSolarMass();
 2469 
 2470     /**
 2471      * Returns by pointer, unit of mass: stone.
 2472      * Caller owns returned value and must free it.
 2473      * Also see {@link #getStone()}.
 2474      * @param status ICU error code.
 2475      * @stable ICU 54
 2476      */
 2477     static MeasureUnit *createStone(UErrorCode &status);
 2478 
 2479     /**
 2480      * Returns by value, unit of mass: stone.
 2481      * Also see {@link #createStone()}.
 2482      * @stable ICU 64
 2483      */
 2484     static MeasureUnit getStone();
 2485 
 2486     /**
 2487      * Returns by pointer, unit of mass: ton.
 2488      * Caller owns returned value and must free it.
 2489      * Also see {@link #getTon()}.
 2490      * @param status ICU error code.
 2491      * @stable ICU 54
 2492      */
 2493     static MeasureUnit *createTon(UErrorCode &status);
 2494 
 2495     /**
 2496      * Returns by value, unit of mass: ton.
 2497      * Also see {@link #createTon()}.
 2498      * @stable ICU 64
 2499      */
 2500     static MeasureUnit getTon();
 2501 
 2502     /**
 2503      * Returns by pointer, unit of power: gigawatt.
 2504      * Caller owns returned value and must free it.
 2505      * Also see {@link #getGigawatt()}.
 2506      * @param status ICU error code.
 2507      * @stable ICU 54
 2508      */
 2509     static MeasureUnit *createGigawatt(UErrorCode &status);
 2510 
 2511     /**
 2512      * Returns by value, unit of power: gigawatt.
 2513      * Also see {@link #createGigawatt()}.
 2514      * @stable ICU 64
 2515      */
 2516     static MeasureUnit getGigawatt();
 2517 
 2518     /**
 2519      * Returns by pointer, unit of power: horsepower.
 2520      * Caller owns returned value and must free it.
 2521      * Also see {@link #getHorsepower()}.
 2522      * @param status ICU error code.
 2523      * @stable ICU 53
 2524      */
 2525     static MeasureUnit *createHorsepower(UErrorCode &status);
 2526 
 2527     /**
 2528      * Returns by value, unit of power: horsepower.
 2529      * Also see {@link #createHorsepower()}.
 2530      * @stable ICU 64
 2531      */
 2532     static MeasureUnit getHorsepower();
 2533 
 2534     /**
 2535      * Returns by pointer, unit of power: kilowatt.
 2536      * Caller owns returned value and must free it.
 2537      * Also see {@link #getKilowatt()}.
 2538      * @param status ICU error code.
 2539      * @stable ICU 53
 2540      */
 2541     static MeasureUnit *createKilowatt(UErrorCode &status);
 2542 
 2543     /**
 2544      * Returns by value, unit of power: kilowatt.
 2545      * Also see {@link #createKilowatt()}.
 2546      * @stable ICU 64
 2547      */
 2548     static MeasureUnit getKilowatt();
 2549 
 2550     /**
 2551      * Returns by pointer, unit of power: megawatt.
 2552      * Caller owns returned value and must free it.
 2553      * Also see {@link #getMegawatt()}.
 2554      * @param status ICU error code.
 2555      * @stable ICU 54
 2556      */
 2557     static MeasureUnit *createMegawatt(UErrorCode &status);
 2558 
 2559     /**
 2560      * Returns by value, unit of power: megawatt.
 2561      * Also see {@link #createMegawatt()}.
 2562      * @stable ICU 64
 2563      */
 2564     static MeasureUnit getMegawatt();
 2565 
 2566     /**
 2567      * Returns by pointer, unit of power: milliwatt.
 2568      * Caller owns returned value and must free it.
 2569      * Also see {@link #getMilliwatt()}.
 2570      * @param status ICU error code.
 2571      * @stable ICU 54
 2572      */
 2573     static MeasureUnit *createMilliwatt(UErrorCode &status);
 2574 
 2575     /**
 2576      * Returns by value, unit of power: milliwatt.
 2577      * Also see {@link #createMilliwatt()}.
 2578      * @stable ICU 64
 2579      */
 2580     static MeasureUnit getMilliwatt();
 2581 
 2582     /**
 2583      * Returns by pointer, unit of power: watt.
 2584      * Caller owns returned value and must free it.
 2585      * Also see {@link #getWatt()}.
 2586      * @param status ICU error code.
 2587      * @stable ICU 53
 2588      */
 2589     static MeasureUnit *createWatt(UErrorCode &status);
 2590 
 2591     /**
 2592      * Returns by value, unit of power: watt.
 2593      * Also see {@link #createWatt()}.
 2594      * @stable ICU 64
 2595      */
 2596     static MeasureUnit getWatt();
 2597 
 2598     /**
 2599      * Returns by pointer, unit of pressure: atmosphere.
 2600      * Caller owns returned value and must free it.
 2601      * Also see {@link #getAtmosphere()}.
 2602      * @param status ICU error code.
 2603      * @stable ICU 63
 2604      */
 2605     static MeasureUnit *createAtmosphere(UErrorCode &status);
 2606 
 2607     /**
 2608      * Returns by value, unit of pressure: atmosphere.
 2609      * Also see {@link #createAtmosphere()}.
 2610      * @stable ICU 64
 2611      */
 2612     static MeasureUnit getAtmosphere();
 2613 
 2614 #ifndef U_HIDE_DRAFT_API
 2615     /**
 2616      * Returns by pointer, unit of pressure: bar.
 2617      * Caller owns returned value and must free it.
 2618      * Also see {@link #getBar()}.
 2619      * @param status ICU error code.
 2620      * @draft ICU 65
 2621      */
 2622     static MeasureUnit *createBar(UErrorCode &status);
 2623 
 2624     /**
 2625      * Returns by value, unit of pressure: bar.
 2626      * Also see {@link #createBar()}.
 2627      * @draft ICU 65
 2628      */
 2629     static MeasureUnit getBar();
 2630 #endif /* U_HIDE_DRAFT_API */
 2631 
 2632     /**
 2633      * Returns by pointer, unit of pressure: hectopascal.
 2634      * Caller owns returned value and must free it.
 2635      * Also see {@link #getHectopascal()}.
 2636      * @param status ICU error code.
 2637      * @stable ICU 53
 2638      */
 2639     static MeasureUnit *createHectopascal(UErrorCode &status);
 2640 
 2641     /**
 2642      * Returns by value, unit of pressure: hectopascal.
 2643      * Also see {@link #createHectopascal()}.
 2644      * @stable ICU 64
 2645      */
 2646     static MeasureUnit getHectopascal();
 2647 
 2648     /**
 2649      * Returns by pointer, unit of pressure: inch-ofhg.
 2650      * Caller owns returned value and must free it.
 2651      * Also see {@link #getInchHg()}.
 2652      * @param status ICU error code.
 2653      * @stable ICU 53
 2654      */
 2655     static MeasureUnit *createInchHg(UErrorCode &status);
 2656 
 2657     /**
 2658      * Returns by value, unit of pressure: inch-ofhg.
 2659      * Also see {@link #createInchHg()}.
 2660      * @stable ICU 64
 2661      */
 2662     static MeasureUnit getInchHg();
 2663 
 2664     /**
 2665      * Returns by pointer, unit of pressure: kilopascal.
 2666      * Caller owns returned value and must free it.
 2667      * Also see {@link #getKilopascal()}.
 2668      * @param status ICU error code.
 2669      * @stable ICU 64
 2670      */
 2671     static MeasureUnit *createKilopascal(UErrorCode &status);
 2672 
 2673     /**
 2674      * Returns by value, unit of pressure: kilopascal.
 2675      * Also see {@link #createKilopascal()}.
 2676      * @stable ICU 64
 2677      */
 2678     static MeasureUnit getKilopascal();
 2679 
 2680     /**
 2681      * Returns by pointer, unit of pressure: megapascal.
 2682      * Caller owns returned value and must free it.
 2683      * Also see {@link #getMegapascal()}.
 2684      * @param status ICU error code.
 2685      * @stable ICU 64
 2686      */
 2687     static MeasureUnit *createMegapascal(UErrorCode &status);
 2688 
 2689     /**
 2690      * Returns by value, unit of pressure: megapascal.
 2691      * Also see {@link #createMegapascal()}.
 2692      * @stable ICU 64
 2693      */
 2694     static MeasureUnit getMegapascal();
 2695 
 2696     /**
 2697      * Returns by pointer, unit of pressure: millibar.
 2698      * Caller owns returned value and must free it.
 2699      * Also see {@link #getMillibar()}.
 2700      * @param status ICU error code.
 2701      * @stable ICU 53
 2702      */
 2703     static MeasureUnit *createMillibar(UErrorCode &status);
 2704 
 2705     /**
 2706      * Returns by value, unit of pressure: millibar.
 2707      * Also see {@link #createMillibar()}.
 2708      * @stable ICU 64
 2709      */
 2710     static MeasureUnit getMillibar();
 2711 
 2712     /**
 2713      * Returns by pointer, unit of pressure: millimeter-ofhg.
 2714      * Caller owns returned value and must free it.
 2715      * Also see {@link #getMillimeterOfMercury()}.
 2716      * @param status ICU error code.
 2717      * @stable ICU 54
 2718      */
 2719     static MeasureUnit *createMillimeterOfMercury(UErrorCode &status);
 2720 
 2721     /**
 2722      * Returns by value, unit of pressure: millimeter-ofhg.
 2723      * Also see {@link #createMillimeterOfMercury()}.
 2724      * @stable ICU 64
 2725      */
 2726     static MeasureUnit getMillimeterOfMercury();
 2727 
 2728 #ifndef U_HIDE_DRAFT_API
 2729     /**
 2730      * Returns by pointer, unit of pressure: pascal.
 2731      * Caller owns returned value and must free it.
 2732      * Also see {@link #getPascal()}.
 2733      * @param status ICU error code.
 2734      * @draft ICU 65
 2735      */
 2736     static MeasureUnit *createPascal(UErrorCode &status);
 2737 
 2738     /**
 2739      * Returns by value, unit of pressure: pascal.
 2740      * Also see {@link #createPascal()}.
 2741      * @draft ICU 65
 2742      */
 2743     static MeasureUnit getPascal();
 2744 #endif /* U_HIDE_DRAFT_API */
 2745 
 2746     /**
 2747      * Returns by pointer, unit of pressure: pound-force-per-square-inch.
 2748      * Caller owns returned value and must free it.
 2749      * Also see {@link #getPoundPerSquareInch()}.
 2750      * @param status ICU error code.
 2751      * @stable ICU 54
 2752      */
 2753     static MeasureUnit *createPoundPerSquareInch(UErrorCode &status);
 2754 
 2755     /**
 2756      * Returns by value, unit of pressure: pound-force-per-square-inch.
 2757      * Also see {@link #createPoundPerSquareInch()}.
 2758      * @stable ICU 64
 2759      */
 2760     static MeasureUnit getPoundPerSquareInch();
 2761 
 2762     /**
 2763      * Returns by pointer, unit of speed: kilometer-per-hour.
 2764      * Caller owns returned value and must free it.
 2765      * Also see {@link #getKilometerPerHour()}.
 2766      * @param status ICU error code.
 2767      * @stable ICU 53
 2768      */
 2769     static MeasureUnit *createKilometerPerHour(UErrorCode &status);
 2770 
 2771     /**
 2772      * Returns by value, unit of speed: kilometer-per-hour.
 2773      * Also see {@link #createKilometerPerHour()}.
 2774      * @stable ICU 64
 2775      */
 2776     static MeasureUnit getKilometerPerHour();
 2777 
 2778     /**
 2779      * Returns by pointer, unit of speed: knot.
 2780      * Caller owns returned value and must free it.
 2781      * Also see {@link #getKnot()}.
 2782      * @param status ICU error code.
 2783      * @stable ICU 56
 2784      */
 2785     static MeasureUnit *createKnot(UErrorCode &status);
 2786 
 2787     /**
 2788      * Returns by value, unit of speed: knot.
 2789      * Also see {@link #createKnot()}.
 2790      * @stable ICU 64
 2791      */
 2792     static MeasureUnit getKnot();
 2793 
 2794     /**
 2795      * Returns by pointer, unit of speed: meter-per-second.
 2796      * Caller owns returned value and must free it.
 2797      * Also see {@link #getMeterPerSecond()}.
 2798      * @param status ICU error code.
 2799      * @stable ICU 53
 2800      */
 2801     static MeasureUnit *createMeterPerSecond(UErrorCode &status);
 2802 
 2803     /**
 2804      * Returns by value, unit of speed: meter-per-second.
 2805      * Also see {@link #createMeterPerSecond()}.
 2806      * @stable ICU 64
 2807      */
 2808     static MeasureUnit getMeterPerSecond();
 2809 
 2810     /**
 2811      * Returns by pointer, unit of speed: mile-per-hour.
 2812      * Caller owns returned value and must free it.
 2813      * Also see {@link #getMilePerHour()}.
 2814      * @param status ICU error code.
 2815      * @stable ICU 53
 2816      */
 2817     static MeasureUnit *createMilePerHour(UErrorCode &status);
 2818 
 2819     /**
 2820      * Returns by value, unit of speed: mile-per-hour.
 2821      * Also see {@link #createMilePerHour()}.
 2822      * @stable ICU 64
 2823      */
 2824     static MeasureUnit getMilePerHour();
 2825 
 2826     /**
 2827      * Returns by pointer, unit of temperature: celsius.
 2828      * Caller owns returned value and must free it.
 2829      * Also see {@link #getCelsius()}.
 2830      * @param status ICU error code.
 2831      * @stable ICU 53
 2832      */
 2833     static MeasureUnit *createCelsius(UErrorCode &status);
 2834 
 2835     /**
 2836      * Returns by value, unit of temperature: celsius.
 2837      * Also see {@link #createCelsius()}.
 2838      * @stable ICU 64
 2839      */
 2840     static MeasureUnit getCelsius();
 2841 
 2842     /**
 2843      * Returns by pointer, unit of temperature: fahrenheit.
 2844      * Caller owns returned value and must free it.
 2845      * Also see {@link #getFahrenheit()}.
 2846      * @param status ICU error code.
 2847      * @stable ICU 53
 2848      */
 2849     static MeasureUnit *createFahrenheit(UErrorCode &status);
 2850 
 2851     /**
 2852      * Returns by value, unit of temperature: fahrenheit.
 2853      * Also see {@link #createFahrenheit()}.
 2854      * @stable ICU 64
 2855      */
 2856     static MeasureUnit getFahrenheit();
 2857 
 2858     /**
 2859      * Returns by pointer, unit of temperature: generic.
 2860      * Caller owns returned value and must free it.
 2861      * Also see {@link #getGenericTemperature()}.
 2862      * @param status ICU error code.
 2863      * @stable ICU 56
 2864      */
 2865     static MeasureUnit *createGenericTemperature(UErrorCode &status);
 2866 
 2867     /**
 2868      * Returns by value, unit of temperature: generic.
 2869      * Also see {@link #createGenericTemperature()}.
 2870      * @stable ICU 64
 2871      */
 2872     static MeasureUnit getGenericTemperature();
 2873 
 2874     /**
 2875      * Returns by pointer, unit of temperature: kelvin.
 2876      * Caller owns returned value and must free it.
 2877      * Also see {@link #getKelvin()}.
 2878      * @param status ICU error code.
 2879      * @stable ICU 54
 2880      */
 2881     static MeasureUnit *createKelvin(UErrorCode &status);
 2882 
 2883     /**
 2884      * Returns by value, unit of temperature: kelvin.
 2885      * Also see {@link #createKelvin()}.
 2886      * @stable ICU 64
 2887      */
 2888     static MeasureUnit getKelvin();
 2889 
 2890     /**
 2891      * Returns by pointer, unit of torque: newton-meter.
 2892      * Caller owns returned value and must free it.
 2893      * Also see {@link #getNewtonMeter()}.
 2894      * @param status ICU error code.
 2895      * @stable ICU 64
 2896      */
 2897     static MeasureUnit *createNewtonMeter(UErrorCode &status);
 2898 
 2899     /**
 2900      * Returns by value, unit of torque: newton-meter.
 2901      * Also see {@link #createNewtonMeter()}.
 2902      * @stable ICU 64
 2903      */
 2904     static MeasureUnit getNewtonMeter();
 2905 
 2906     /**
 2907      * Returns by pointer, unit of torque: pound-force-foot.
 2908      * Caller owns returned value and must free it.
 2909      * Also see {@link #getPoundFoot()}.
 2910      * @param status ICU error code.
 2911      * @stable ICU 64
 2912      */
 2913     static MeasureUnit *createPoundFoot(UErrorCode &status);
 2914 
 2915     /**
 2916      * Returns by value, unit of torque: pound-force-foot.
 2917      * Also see {@link #createPoundFoot()}.
 2918      * @stable ICU 64
 2919      */
 2920     static MeasureUnit getPoundFoot();
 2921 
 2922     /**
 2923      * Returns by pointer, unit of volume: acre-foot.
 2924      * Caller owns returned value and must free it.
 2925      * Also see {@link #getAcreFoot()}.
 2926      * @param status ICU error code.
 2927      * @stable ICU 54
 2928      */
 2929     static MeasureUnit *createAcreFoot(UErrorCode &status);
 2930 
 2931     /**
 2932      * Returns by value, unit of volume: acre-foot.
 2933      * Also see {@link #createAcreFoot()}.
 2934      * @stable ICU 64
 2935      */
 2936     static MeasureUnit getAcreFoot();
 2937 
 2938     /**
 2939      * Returns by pointer, unit of volume: barrel.
 2940      * Caller owns returned value and must free it.
 2941      * Also see {@link #getBarrel()}.
 2942      * @param status ICU error code.
 2943      * @stable ICU 64
 2944      */
 2945     static MeasureUnit *createBarrel(UErrorCode &status);
 2946 
 2947     /**
 2948      * Returns by value, unit of volume: barrel.
 2949      * Also see {@link #createBarrel()}.
 2950      * @stable ICU 64
 2951      */
 2952     static MeasureUnit getBarrel();
 2953 
 2954     /**
 2955      * Returns by pointer, unit of volume: bushel.
 2956      * Caller owns returned value and must free it.
 2957      * Also see {@link #getBushel()}.
 2958      * @param status ICU error code.
 2959      * @stable ICU 54
 2960      */
 2961     static MeasureUnit *createBushel(UErrorCode &status);
 2962 
 2963     /**
 2964      * Returns by value, unit of volume: bushel.
 2965      * Also see {@link #createBushel()}.
 2966      * @stable ICU 64
 2967      */
 2968     static MeasureUnit getBushel();
 2969 
 2970     /**
 2971      * Returns by pointer, unit of volume: centiliter.
 2972      * Caller owns returned value and must free it.
 2973      * Also see {@link #getCentiliter()}.
 2974      * @param status ICU error code.
 2975      * @stable ICU 54
 2976      */
 2977     static MeasureUnit *createCentiliter(UErrorCode &status);
 2978 
 2979     /**
 2980      * Returns by value, unit of volume: centiliter.
 2981      * Also see {@link #createCentiliter()}.
 2982      * @stable ICU 64
 2983      */
 2984     static MeasureUnit getCentiliter();
 2985 
 2986     /**
 2987      * Returns by pointer, unit of volume: cubic-centimeter.
 2988      * Caller owns returned value and must free it.
 2989      * Also see {@link #getCubicCentimeter()}.
 2990      * @param status ICU error code.
 2991      * @stable ICU 54
 2992      */
 2993     static MeasureUnit *createCubicCentimeter(UErrorCode &status);
 2994 
 2995     /**
 2996      * Returns by value, unit of volume: cubic-centimeter.
 2997      * Also see {@link #createCubicCentimeter()}.
 2998      * @stable ICU 64
 2999      */
 3000     static MeasureUnit getCubicCentimeter();
 3001 
 3002     /**
 3003      * Returns by pointer, unit of volume: cubic-foot.
 3004      * Caller owns returned value and must free it.
 3005      * Also see {@link #getCubicFoot()}.
 3006      * @param status ICU error code.
 3007      * @stable ICU 54
 3008      */
 3009     static MeasureUnit *createCubicFoot(UErrorCode &status);
 3010 
 3011     /**
 3012      * Returns by value, unit of volume: cubic-foot.
 3013      * Also see {@link #createCubicFoot()}.
 3014      * @stable ICU 64
 3015      */
 3016     static MeasureUnit getCubicFoot();
 3017 
 3018     /**
 3019      * Returns by pointer, unit of volume: cubic-inch.
 3020      * Caller owns returned value and must free it.
 3021      * Also see {@link #getCubicInch()}.
 3022      * @param status ICU error code.
 3023      * @stable ICU 54
 3024      */
 3025     static MeasureUnit *createCubicInch(UErrorCode &status);
 3026 
 3027     /**
 3028      * Returns by value, unit of volume: cubic-inch.
 3029      * Also see {@link #createCubicInch()}.
 3030      * @stable ICU 64
 3031      */
 3032     static MeasureUnit getCubicInch();
 3033 
 3034     /**
 3035      * Returns by pointer, unit of volume: cubic-kilometer.
 3036      * Caller owns returned value and must free it.
 3037      * Also see {@link #getCubicKilometer()}.
 3038      * @param status ICU error code.
 3039      * @stable ICU 53
 3040      */
 3041     static MeasureUnit *createCubicKilometer(UErrorCode &status);
 3042 
 3043     /**
 3044      * Returns by value, unit of volume: cubic-kilometer.
 3045      * Also see {@link #createCubicKilometer()}.
 3046      * @stable ICU 64
 3047      */
 3048     static MeasureUnit getCubicKilometer();
 3049 
 3050     /**
 3051      * Returns by pointer, unit of volume: cubic-meter.
 3052      * Caller owns returned value and must free it.
 3053      * Also see {@link #getCubicMeter()}.
 3054      * @param status ICU error code.
 3055      * @stable ICU 54
 3056      */
 3057     static MeasureUnit *createCubicMeter(UErrorCode &status);
 3058 
 3059     /**
 3060      * Returns by value, unit of volume: cubic-meter.
 3061      * Also see {@link #createCubicMeter()}.
 3062      * @stable ICU 64
 3063      */
 3064     static MeasureUnit getCubicMeter();
 3065 
 3066     /**
 3067      * Returns by pointer, unit of volume: cubic-mile.
 3068      * Caller owns returned value and must free it.
 3069      * Also see {@link #getCubicMile()}.
 3070      * @param status ICU error code.
 3071      * @stable ICU 53
 3072      */
 3073     static MeasureUnit *createCubicMile(UErrorCode &status);
 3074 
 3075     /**
 3076      * Returns by value, unit of volume: cubic-mile.
 3077      * Also see {@link #createCubicMile()}.
 3078      * @stable ICU 64
 3079      */
 3080     static MeasureUnit getCubicMile();
 3081 
 3082     /**
 3083      * Returns by pointer, unit of volume: cubic-yard.
 3084      * Caller owns returned value and must free it.
 3085      * Also see {@link #getCubicYard()}.
 3086      * @param status ICU error code.
 3087      * @stable ICU 54
 3088      */
 3089     static MeasureUnit *createCubicYard(UErrorCode &status);
 3090 
 3091     /**
 3092      * Returns by value, unit of volume: cubic-yard.
 3093      * Also see {@link #createCubicYard()}.
 3094      * @stable ICU 64
 3095      */
 3096     static MeasureUnit getCubicYard();
 3097 
 3098     /**
 3099      * Returns by pointer, unit of volume: cup.
 3100      * Caller owns returned value and must free it.
 3101      * Also see {@link #getCup()}.
 3102      * @param status ICU error code.
 3103      * @stable ICU 54
 3104      */
 3105     static MeasureUnit *createCup(UErrorCode &status);
 3106 
 3107     /**
 3108      * Returns by value, unit of volume: cup.
 3109      * Also see {@link #createCup()}.
 3110      * @stable ICU 64
 3111      */
 3112     static MeasureUnit getCup();
 3113 
 3114     /**
 3115      * Returns by pointer, unit of volume: cup-metric.
 3116      * Caller owns returned value and must free it.
 3117      * Also see {@link #getCupMetric()}.
 3118      * @param status ICU error code.
 3119      * @stable ICU 56
 3120      */
 3121     static MeasureUnit *createCupMetric(UErrorCode &status);
 3122 
 3123     /**
 3124      * Returns by value, unit of volume: cup-metric.
 3125      * Also see {@link #createCupMetric()}.
 3126      * @stable ICU 64
 3127      */
 3128     static MeasureUnit getCupMetric();
 3129 
 3130     /**
 3131      * Returns by pointer, unit of volume: deciliter.
 3132      * Caller owns returned value and must free it.
 3133      * Also see {@link #getDeciliter()}.
 3134      * @param status ICU error code.
 3135      * @stable ICU 54
 3136      */
 3137     static MeasureUnit *createDeciliter(UErrorCode &status);
 3138 
 3139     /**
 3140      * Returns by value, unit of volume: deciliter.
 3141      * Also see {@link #createDeciliter()}.
 3142      * @stable ICU 64
 3143      */
 3144     static MeasureUnit getDeciliter();
 3145 
 3146     /**
 3147      * Returns by pointer, unit of volume: fluid-ounce.
 3148      * Caller owns returned value and must free it.
 3149      * Also see {@link #getFluidOunce()}.
 3150      * @param status ICU error code.
 3151      * @stable ICU 54
 3152      */
 3153     static MeasureUnit *createFluidOunce(UErrorCode &status);
 3154 
 3155     /**
 3156      * Returns by value, unit of volume: fluid-ounce.
 3157      * Also see {@link #createFluidOunce()}.
 3158      * @stable ICU 64
 3159      */
 3160     static MeasureUnit getFluidOunce();
 3161 
 3162     /**
 3163      * Returns by pointer, unit of volume: fluid-ounce-imperial.
 3164      * Caller owns returned value and must free it.
 3165      * Also see {@link #getFluidOunceImperial()}.
 3166      * @param status ICU error code.
 3167      * @stable ICU 64
 3168      */
 3169     static MeasureUnit *createFluidOunceImperial(UErrorCode &status);
 3170 
 3171     /**
 3172      * Returns by value, unit of volume: fluid-ounce-imperial.
 3173      * Also see {@link #createFluidOunceImperial()}.
 3174      * @stable ICU 64
 3175      */
 3176     static MeasureUnit getFluidOunceImperial();
 3177 
 3178     /**
 3179      * Returns by pointer, unit of volume: gallon.
 3180      * Caller owns returned value and must free it.
 3181      * Also see {@link #getGallon()}.
 3182      * @param status ICU error code.
 3183      * @stable ICU 54
 3184      */
 3185     static MeasureUnit *createGallon(UErrorCode &status);
 3186 
 3187     /**
 3188      * Returns by value, unit of volume: gallon.
 3189      * Also see {@link #createGallon()}.
 3190      * @stable ICU 64
 3191      */
 3192     static MeasureUnit getGallon();
 3193 
 3194     /**
 3195      * Returns by pointer, unit of volume: gallon-imperial.
 3196      * Caller owns returned value and must free it.
 3197      * Also see {@link #getGallonImperial()}.
 3198      * @param status ICU error code.
 3199      * @stable ICU 57
 3200      */
 3201     static MeasureUnit *createGallonImperial(UErrorCode &status);
 3202 
 3203     /**
 3204      * Returns by value, unit of volume: gallon-imperial.
 3205      * Also see {@link #createGallonImperial()}.
 3206      * @stable ICU 64
 3207      */
 3208     static MeasureUnit getGallonImperial();
 3209 
 3210     /**
 3211      * Returns by pointer, unit of volume: hectoliter.
 3212      * Caller owns returned value and must free it.
 3213      * Also see {@link #getHectoliter()}.
 3214      * @param status ICU error code.
 3215      * @stable ICU 54
 3216      */
 3217     static MeasureUnit *createHectoliter(UErrorCode &status);
 3218 
 3219     /**
 3220      * Returns by value, unit of volume: hectoliter.
 3221      * Also see {@link #createHectoliter()}.
 3222      * @stable ICU 64
 3223      */
 3224     static MeasureUnit getHectoliter();
 3225 
 3226     /**
 3227      * Returns by pointer, unit of volume: liter.
 3228      * Caller owns returned value and must free it.
 3229      * Also see {@link #getLiter()}.
 3230      * @param status ICU error code.
 3231      * @stable ICU 53
 3232      */
 3233     static MeasureUnit *createLiter(UErrorCode &status);
 3234 
 3235     /**
 3236      * Returns by value, unit of volume: liter.
 3237      * Also see {@link #createLiter()}.
 3238      * @stable ICU 64
 3239      */
 3240     static MeasureUnit getLiter();
 3241 
 3242     /**
 3243      * Returns by pointer, unit of volume: megaliter.
 3244      * Caller owns returned value and must free it.
 3245      * Also see {@link #getMegaliter()}.
 3246      * @param status ICU error code.
 3247      * @stable ICU 54
 3248      */
 3249     static MeasureUnit *createMegaliter(UErrorCode &status);
 3250 
 3251     /**
 3252      * Returns by value, unit of volume: megaliter.
 3253      * Also see {@link #createMegaliter()}.
 3254      * @stable ICU 64
 3255      */
 3256     static MeasureUnit getMegaliter();
 3257 
 3258     /**
 3259      * Returns by pointer, unit of volume: milliliter.
 3260      * Caller owns returned value and must free it.
 3261      * Also see {@link #getMilliliter()}.
 3262      * @param status ICU error code.
 3263      * @stable ICU 54
 3264      */
 3265     static MeasureUnit *createMilliliter(UErrorCode &status);
 3266 
 3267     /**
 3268      * Returns by value, unit of volume: milliliter.
 3269      * Also see {@link #createMilliliter()}.
 3270      * @stable ICU 64
 3271      */
 3272     static MeasureUnit getMilliliter();
 3273 
 3274     /**
 3275      * Returns by pointer, unit of volume: pint.
 3276      * Caller owns returned value and must free it.
 3277      * Also see {@link #getPint()}.
 3278      * @param status ICU error code.
 3279      * @stable ICU 54
 3280      */
 3281     static MeasureUnit *createPint(UErrorCode &status);
 3282 
 3283     /**
 3284      * Returns by value, unit of volume: pint.
 3285      * Also see {@link #createPint()}.
 3286      * @stable ICU 64
 3287      */
 3288     static MeasureUnit getPint();
 3289 
 3290     /**
 3291      * Returns by pointer, unit of volume: pint-metric.
 3292      * Caller owns returned value and must free it.
 3293      * Also see {@link #getPintMetric()}.
 3294      * @param status ICU error code.
 3295      * @stable ICU 56
 3296      */
 3297     static MeasureUnit *createPintMetric(UErrorCode &status);
 3298 
 3299     /**
 3300      * Returns by value, unit of volume: pint-metric.
 3301      * Also see {@link #createPintMetric()}.
 3302      * @stable ICU 64
 3303      */
 3304     static MeasureUnit getPintMetric();
 3305 
 3306     /**
 3307      * Returns by pointer, unit of volume: quart.
 3308      * Caller owns returned value and must free it.
 3309      * Also see {@link #getQuart()}.
 3310      * @param status ICU error code.
 3311      * @stable ICU 54
 3312      */
 3313     static MeasureUnit *createQuart(UErrorCode &status);
 3314 
 3315     /**
 3316      * Returns by value, unit of volume: quart.
 3317      * Also see {@link #createQuart()}.
 3318      * @stable ICU 64
 3319      */
 3320     static MeasureUnit getQuart();
 3321 
 3322     /**
 3323      * Returns by pointer, unit of volume: tablespoon.
 3324      * Caller owns returned value and must free it.
 3325      * Also see {@link #getTablespoon()}.
 3326      * @param status ICU error code.
 3327      * @stable ICU 54
 3328      */
 3329     static MeasureUnit *createTablespoon(UErrorCode &status);
 3330 
 3331     /**
 3332      * Returns by value, unit of volume: tablespoon.
 3333      * Also see {@link #createTablespoon()}.
 3334      * @stable ICU 64
 3335      */
 3336     static MeasureUnit getTablespoon();
 3337 
 3338     /**
 3339      * Returns by pointer, unit of volume: teaspoon.
 3340      * Caller owns returned value and must free it.
 3341      * Also see {@link #getTeaspoon()}.
 3342      * @param status ICU error code.
 3343      * @stable ICU 54
 3344      */
 3345     static MeasureUnit *createTeaspoon(UErrorCode &status);
 3346 
 3347     /**
 3348      * Returns by value, unit of volume: teaspoon.
 3349      * Also see {@link #createTeaspoon()}.
 3350      * @stable ICU 64
 3351      */
 3352     static MeasureUnit getTeaspoon();
 3353 
 3354 
 3355 // End generated createXXX methods
 3356 
 3357  protected:
 3358 
 3359 #ifndef U_HIDE_INTERNAL_API
 3360     /**
 3361      * For ICU use only.
 3362      * @internal
 3363      */
 3364     void initTime(const char *timeId);
 3365 
 3366     /**
 3367      * For ICU use only.
 3368      * @internal
 3369      */
 3370     void initCurrency(StringPiece isoCurrency);
 3371 
 3372     /**
 3373      * For ICU use only.
 3374      * @internal
 3375      */
 3376     void initNoUnit(const char *subtype);
 3377 
 3378 #endif  /* U_HIDE_INTERNAL_API */
 3379 
 3380 private:
 3381 
 3382     // Used by new draft APIs in ICU 67. If non-null, fImpl is owned by the
 3383     // MeasureUnit.
 3384     MeasureUnitImpl* fImpl;
 3385 
 3386     // An index into a static string list in measunit.cpp. If set to -1, fImpl
 3387     // is in use instead of fTypeId and fSubTypeId.
 3388     int16_t fSubTypeId;
 3389     // An index into a static string list in measunit.cpp. If set to -1, fImpl
 3390     // is in use instead of fTypeId and fSubTypeId.
 3391     int8_t fTypeId;
 3392 
 3393     MeasureUnit(int32_t typeId, int32_t subTypeId);
 3394     MeasureUnit(MeasureUnitImpl&& impl);
 3395     void setTo(int32_t typeId, int32_t subTypeId);
 3396     int32_t getOffset() const;
 3397     static MeasureUnit *create(int typeId, int subTypeId, UErrorCode &status);
 3398 
 3399     /**
 3400      * Sets output's typeId and subTypeId according to subType, if subType is a
 3401      * valid/known identifier.
 3402      *
 3403      * @return Whether subType is known to ICU. If false, output was not
 3404      * modified.
 3405      */
 3406     static bool findBySubType(StringPiece subType, MeasureUnit* output);
 3407 
 3408     friend struct MeasureUnitImpl;
 3409 };
 3410 
 3411 U_NAMESPACE_END
 3412 
 3413 #endif // !UNCONFIG_NO_FORMATTING
 3414 
 3415 #endif /* U_SHOW_CPLUSPLUS_API */
 3416 
 3417 #endif // __MEASUREUNIT_H__