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