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