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