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