jpayne@69: // © 2016 and later: Unicode, Inc. and others. jpayne@69: // License & terms of use: http://www.unicode.org/copyright.html jpayne@69: /* jpayne@69: ********************************************************************** jpayne@69: * Copyright (c) 2004-2016, International Business Machines jpayne@69: * Corporation and others. All Rights Reserved. jpayne@69: ********************************************************************** jpayne@69: * Author: Alan Liu jpayne@69: * Created: April 26, 2004 jpayne@69: * Since: ICU 3.0 jpayne@69: ********************************************************************** jpayne@69: */ jpayne@69: #ifndef __MEASUREUNIT_H__ jpayne@69: #define __MEASUREUNIT_H__ jpayne@69: jpayne@69: #include "unicode/utypes.h" jpayne@69: jpayne@69: #if U_SHOW_CPLUSPLUS_API jpayne@69: jpayne@69: #if !UCONFIG_NO_FORMATTING jpayne@69: jpayne@69: #include "unicode/unistr.h" jpayne@69: #include "unicode/localpointer.h" jpayne@69: jpayne@69: /** jpayne@69: * \file jpayne@69: * \brief C++ API: A unit for measuring a quantity. jpayne@69: */ jpayne@69: jpayne@69: U_NAMESPACE_BEGIN jpayne@69: jpayne@69: class StringEnumeration; jpayne@69: struct MeasureUnitImpl; jpayne@69: jpayne@69: #ifndef U_HIDE_DRAFT_API jpayne@69: /** jpayne@69: * Enumeration for unit complexity. There are three levels: jpayne@69: * jpayne@69: * - SINGLE: A single unit, optionally with a power and/or SI prefix. Examples: hectare, jpayne@69: * square-kilometer, kilojoule, per-second. jpayne@69: * - COMPOUND: A unit composed of the product of multiple single units. Examples: jpayne@69: * meter-per-second, kilowatt-hour, kilogram-meter-per-square-second. jpayne@69: * - MIXED: A unit composed of the sum of multiple single units. Examples: foot+inch, jpayne@69: * hour+minute+second, degree+arcminute+arcsecond. jpayne@69: * jpayne@69: * The complexity determines which operations are available. For example, you cannot set the power jpayne@69: * or SI prefix of a compound unit. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: enum UMeasureUnitComplexity { jpayne@69: /** jpayne@69: * A single unit, like kilojoule. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_UNIT_SINGLE, jpayne@69: jpayne@69: /** jpayne@69: * A compound unit, like meter-per-second. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_UNIT_COMPOUND, jpayne@69: jpayne@69: /** jpayne@69: * A mixed unit, like hour+minute. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_UNIT_MIXED jpayne@69: }; jpayne@69: jpayne@69: /** jpayne@69: * Enumeration for SI prefixes, such as "kilo". jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: typedef enum UMeasureSIPrefix { jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: yotta, 10^24. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_YOTTA = 24, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: zetta, 10^21. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_ZETTA = 21, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: exa, 10^18. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_EXA = 18, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: peta, 10^15. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_PETA = 15, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: tera, 10^12. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_TERA = 12, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: giga, 10^9. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_GIGA = 9, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: mega, 10^6. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_MEGA = 6, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: kilo, 10^3. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_KILO = 3, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: hecto, 10^2. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_HECTO = 2, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: deka, 10^1. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_DEKA = 1, jpayne@69: jpayne@69: /** jpayne@69: * The absence of an SI prefix. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_ONE = 0, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: deci, 10^-1. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_DECI = -1, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: centi, 10^-2. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_CENTI = -2, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: milli, 10^-3. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_MILLI = -3, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: micro, 10^-6. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_MICRO = -6, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: nano, 10^-9. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_NANO = -9, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: pico, 10^-12. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_PICO = -12, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: femto, 10^-15. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_FEMTO = -15, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: atto, 10^-18. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_ATTO = -18, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: zepto, 10^-21. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_ZEPTO = -21, jpayne@69: jpayne@69: /** jpayne@69: * SI prefix: yocto, 10^-24. jpayne@69: * jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMEASURE_SI_PREFIX_YOCTO = -24 jpayne@69: } UMeasureSIPrefix; jpayne@69: #endif // U_HIDE_DRAFT_API jpayne@69: jpayne@69: /** jpayne@69: * A unit such as length, mass, volume, currency, etc. A unit is jpayne@69: * coupled with a numeric amount to produce a Measure. jpayne@69: * jpayne@69: * @author Alan Liu jpayne@69: * @stable ICU 3.0 jpayne@69: */ jpayne@69: class U_I18N_API MeasureUnit: public UObject { jpayne@69: public: jpayne@69: jpayne@69: /** jpayne@69: * Default constructor. jpayne@69: * Populates the instance with the base dimensionless unit. jpayne@69: * @stable ICU 3.0 jpayne@69: */ jpayne@69: MeasureUnit(); jpayne@69: jpayne@69: /** jpayne@69: * Copy constructor. jpayne@69: * @stable ICU 3.0 jpayne@69: */ jpayne@69: MeasureUnit(const MeasureUnit &other); jpayne@69: jpayne@69: #ifndef U_HIDE_DRAFT_API jpayne@69: /** jpayne@69: * Move constructor. jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: MeasureUnit(MeasureUnit &&other) noexcept; jpayne@69: jpayne@69: /** jpayne@69: * Construct a MeasureUnit from a CLDR Unit Identifier, defined in UTS 35. jpayne@69: * Validates and canonicalizes the identifier. jpayne@69: * jpayne@69: *
jpayne@69:      * MeasureUnit example = MeasureUnit::forIdentifier("furlong-per-nanosecond")
jpayne@69:      * 
jpayne@69: * jpayne@69: * @param identifier The CLDR Unit Identifier jpayne@69: * @param status Set if the identifier is invalid. jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: static MeasureUnit forIdentifier(StringPiece identifier, UErrorCode& status); jpayne@69: #endif // U_HIDE_DRAFT_API jpayne@69: jpayne@69: /** jpayne@69: * Copy assignment operator. jpayne@69: * @stable ICU 3.0 jpayne@69: */ jpayne@69: MeasureUnit &operator=(const MeasureUnit &other); jpayne@69: jpayne@69: #ifndef U_HIDE_DRAFT_API jpayne@69: /** jpayne@69: * Move assignment operator. jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: MeasureUnit &operator=(MeasureUnit &&other) noexcept; jpayne@69: #endif // U_HIDE_DRAFT_API jpayne@69: jpayne@69: /** jpayne@69: * Returns a polymorphic clone of this object. The result will jpayne@69: * have the same class as returned by getDynamicClassID(). jpayne@69: * @stable ICU 3.0 jpayne@69: */ jpayne@69: virtual MeasureUnit* clone() const; jpayne@69: jpayne@69: /** jpayne@69: * Destructor jpayne@69: * @stable ICU 3.0 jpayne@69: */ jpayne@69: virtual ~MeasureUnit(); jpayne@69: jpayne@69: /** jpayne@69: * Equality operator. Return true if this object is equal jpayne@69: * to the given object. jpayne@69: * @stable ICU 3.0 jpayne@69: */ jpayne@69: virtual UBool operator==(const UObject& other) const; jpayne@69: jpayne@69: /** jpayne@69: * Inequality operator. Return true if this object is not equal jpayne@69: * to the given object. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: UBool operator!=(const UObject& other) const { jpayne@69: return !(*this == other); jpayne@69: } jpayne@69: jpayne@69: /** jpayne@69: * Get the type. jpayne@69: * jpayne@69: * If the unit does not have a type, the empty string is returned. jpayne@69: * jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: const char *getType() const; jpayne@69: jpayne@69: /** jpayne@69: * Get the sub type. jpayne@69: * jpayne@69: * If the unit does not have a subtype, the empty string is returned. jpayne@69: * jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: const char *getSubtype() const; jpayne@69: jpayne@69: #ifndef U_HIDE_DRAFT_API jpayne@69: /** jpayne@69: * Get the CLDR Unit Identifier for this MeasureUnit, as defined in UTS 35. jpayne@69: * jpayne@69: * @return The string form of this unit, owned by this MeasureUnit. jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: const char* getIdentifier() const; jpayne@69: jpayne@69: /** jpayne@69: * Compute the complexity of the unit. See UMeasureUnitComplexity for more information. jpayne@69: * jpayne@69: * @param status Set if an error occurs. jpayne@69: * @return The unit complexity. jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMeasureUnitComplexity getComplexity(UErrorCode& status) const; jpayne@69: jpayne@69: /** jpayne@69: * Creates a MeasureUnit which is this SINGLE unit augmented with the specified SI prefix. jpayne@69: * For example, UMEASURE_SI_PREFIX_KILO for "kilo". jpayne@69: * jpayne@69: * There is sufficient locale data to format all standard SI prefixes. jpayne@69: * jpayne@69: * NOTE: Only works on SINGLE units. If this is a COMPOUND or MIXED unit, an error will jpayne@69: * occur. For more information, see UMeasureUnitComplexity. jpayne@69: * jpayne@69: * @param prefix The SI prefix, from UMeasureSIPrefix. jpayne@69: * @param status Set if this is not a SINGLE unit or if another error occurs. jpayne@69: * @return A new SINGLE unit. jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: MeasureUnit withSIPrefix(UMeasureSIPrefix prefix, UErrorCode& status) const; jpayne@69: jpayne@69: /** jpayne@69: * Gets the current SI prefix of this SINGLE unit. For example, if the unit has the SI prefix jpayne@69: * "kilo", then UMEASURE_SI_PREFIX_KILO is returned. jpayne@69: * jpayne@69: * NOTE: Only works on SINGLE units. If this is a COMPOUND or MIXED unit, an error will jpayne@69: * occur. For more information, see UMeasureUnitComplexity. jpayne@69: * jpayne@69: * @param status Set if this is not a SINGLE unit or if another error occurs. jpayne@69: * @return The SI prefix of this SINGLE unit, from UMeasureSIPrefix. jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: UMeasureSIPrefix getSIPrefix(UErrorCode& status) const; jpayne@69: jpayne@69: /** jpayne@69: * Creates a MeasureUnit which is this SINGLE unit augmented with the specified dimensionality jpayne@69: * (power). For example, if dimensionality is 2, the unit will be squared. jpayne@69: * jpayne@69: * NOTE: Only works on SINGLE units. If this is a COMPOUND or MIXED unit, an error will jpayne@69: * occur. For more information, see UMeasureUnitComplexity. jpayne@69: * jpayne@69: * For the base dimensionless unit, withDimensionality does nothing. jpayne@69: * jpayne@69: * @param dimensionality The dimensionality (power). jpayne@69: * @param status Set if this is not a SINGLE unit or if another error occurs. jpayne@69: * @return A new SINGLE unit. jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: MeasureUnit withDimensionality(int32_t dimensionality, UErrorCode& status) const; jpayne@69: jpayne@69: /** jpayne@69: * Gets the dimensionality (power) of this MeasureUnit. For example, if the unit is square, jpayne@69: * then 2 is returned. jpayne@69: * jpayne@69: * NOTE: Only works on SINGLE units. If this is a COMPOUND or MIXED unit, an error will jpayne@69: * occur. For more information, see UMeasureUnitComplexity. jpayne@69: * jpayne@69: * For the base dimensionless unit, getDimensionality returns 0. jpayne@69: * jpayne@69: * @param status Set if this is not a SINGLE unit or if another error occurs. jpayne@69: * @return The dimensionality (power) of this simple unit. jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: int32_t getDimensionality(UErrorCode& status) const; jpayne@69: jpayne@69: /** jpayne@69: * Gets the reciprocal of this MeasureUnit, with the numerator and denominator flipped. jpayne@69: * jpayne@69: * For example, if the receiver is "meter-per-second", the unit "second-per-meter" is returned. jpayne@69: * jpayne@69: * NOTE: Only works on SINGLE and COMPOUND units. If this is a MIXED unit, an error will jpayne@69: * occur. For more information, see UMeasureUnitComplexity. jpayne@69: * jpayne@69: * @param status Set if this is a MIXED unit or if another error occurs. jpayne@69: * @return The reciprocal of the target unit. jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: MeasureUnit reciprocal(UErrorCode& status) const; jpayne@69: jpayne@69: /** jpayne@69: * Gets the product of this unit with another unit. This is a way to build units from jpayne@69: * constituent parts. jpayne@69: * jpayne@69: * The numerator and denominator are preserved through this operation. jpayne@69: * jpayne@69: * For example, if the receiver is "kilowatt" and the argument is "hour-per-day", then the jpayne@69: * unit "kilowatt-hour-per-day" is returned. jpayne@69: * jpayne@69: * NOTE: Only works on SINGLE and COMPOUND units. If either unit (receivee and argument) is a jpayne@69: * MIXED unit, an error will occur. For more information, see UMeasureUnitComplexity. jpayne@69: * jpayne@69: * @param other The MeasureUnit to multiply with the target. jpayne@69: * @param status Set if this or other is a MIXED unit or if another error occurs. jpayne@69: * @return The product of the target unit with the provided unit. jpayne@69: * @draft ICU 67 jpayne@69: */ jpayne@69: MeasureUnit product(const MeasureUnit& other, UErrorCode& status) const; jpayne@69: #endif // U_HIDE_DRAFT_API jpayne@69: jpayne@69: #ifndef U_HIDE_INTERNAL_API jpayne@69: /** jpayne@69: * Gets the list of SINGLE units contained within a MIXED of COMPOUND unit. jpayne@69: * jpayne@69: * Examples: jpayne@69: * - Given "meter-kilogram-per-second", three units will be returned: "meter", jpayne@69: * "kilogram", and "per-second". jpayne@69: * - Given "hour+minute+second", three units will be returned: "hour", "minute", jpayne@69: * and "second". jpayne@69: * jpayne@69: * If this is a SINGLE unit, an array of length 1 will be returned. jpayne@69: * jpayne@69: * TODO(ICU-21021): Finalize this API and propose it as draft. jpayne@69: * jpayne@69: * @param outCount The number of elements in the return array. jpayne@69: * @param status Set if an error occurs. jpayne@69: * @return An array of single units, owned by the caller. jpayne@69: * @internal ICU 67 Technical Preview jpayne@69: */ jpayne@69: LocalArray splitToSingleUnits(int32_t& outCount, UErrorCode& status) const; jpayne@69: #endif // U_HIDE_INTERNAL_API jpayne@69: jpayne@69: /** jpayne@69: * getAvailable gets all of the available units. jpayne@69: * If there are too many units to fit into destCapacity then the jpayne@69: * error code is set to U_BUFFER_OVERFLOW_ERROR. jpayne@69: * jpayne@69: * @param destArray destination buffer. jpayne@69: * @param destCapacity number of MeasureUnit instances available at dest. jpayne@69: * @param errorCode ICU error code. jpayne@69: * @return number of available units. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static int32_t getAvailable( jpayne@69: MeasureUnit *destArray, jpayne@69: int32_t destCapacity, jpayne@69: UErrorCode &errorCode); jpayne@69: jpayne@69: /** jpayne@69: * getAvailable gets all of the available units for a specific type. jpayne@69: * If there are too many units to fit into destCapacity then the jpayne@69: * error code is set to U_BUFFER_OVERFLOW_ERROR. jpayne@69: * jpayne@69: * @param type the type jpayne@69: * @param destArray destination buffer. jpayne@69: * @param destCapacity number of MeasureUnit instances available at dest. jpayne@69: * @param errorCode ICU error code. jpayne@69: * @return number of available units for type. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static int32_t getAvailable( jpayne@69: const char *type, jpayne@69: MeasureUnit *destArray, jpayne@69: int32_t destCapacity, jpayne@69: UErrorCode &errorCode); jpayne@69: jpayne@69: /** jpayne@69: * getAvailableTypes gets all of the available types. Caller owns the jpayne@69: * returned StringEnumeration and must delete it when finished using it. jpayne@69: * jpayne@69: * @param errorCode ICU error code. jpayne@69: * @return the types. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static StringEnumeration* getAvailableTypes(UErrorCode &errorCode); jpayne@69: jpayne@69: /** jpayne@69: * Return the class ID for this class. This is useful only for comparing to jpayne@69: * a return value from getDynamicClassID(). For example: jpayne@69: *
jpayne@69:      * .   Base* polymorphic_pointer = createPolymorphicObject();
jpayne@69:      * .   if (polymorphic_pointer->getDynamicClassID() ==
jpayne@69:      * .       Derived::getStaticClassID()) ...
jpayne@69:      * 
jpayne@69: * @return The class ID for all objects of this class. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static UClassID U_EXPORT2 getStaticClassID(void); jpayne@69: jpayne@69: /** jpayne@69: * Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This jpayne@69: * method is to implement a simple version of RTTI, since not all C++ jpayne@69: * compilers support genuine RTTI. Polymorphic operator==() and clone() jpayne@69: * methods call this method. jpayne@69: * jpayne@69: * @return The class ID for this object. All objects of a jpayne@69: * given class have the same class ID. Objects of jpayne@69: * other classes have different class IDs. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: virtual UClassID getDynamicClassID(void) const; jpayne@69: jpayne@69: #ifndef U_HIDE_INTERNAL_API jpayne@69: /** jpayne@69: * ICU use only. jpayne@69: * Returns associated array index for this measure unit. Only valid for jpayne@69: * non-currency measure units. jpayne@69: * @internal jpayne@69: */ jpayne@69: int32_t getIndex() const; jpayne@69: jpayne@69: /** jpayne@69: * ICU use only. jpayne@69: * Returns maximum value from getIndex plus 1. jpayne@69: * @internal jpayne@69: */ jpayne@69: static int32_t getIndexCount(); jpayne@69: jpayne@69: /** jpayne@69: * ICU use only. jpayne@69: * @return the unit.getIndex() of the unit which has this unit.getType() and unit.getSubtype(), jpayne@69: * or a negative value if there is no such unit jpayne@69: * @internal jpayne@69: */ jpayne@69: static int32_t internalGetIndexForTypeAndSubtype(const char *type, const char *subtype); jpayne@69: jpayne@69: /** jpayne@69: * ICU use only. jpayne@69: * @internal jpayne@69: */ jpayne@69: static MeasureUnit resolveUnitPerUnit( jpayne@69: const MeasureUnit &unit, const MeasureUnit &perUnit, bool* isResolved); jpayne@69: #endif /* U_HIDE_INTERNAL_API */ jpayne@69: jpayne@69: // All code between the "Start generated createXXX methods" comment and jpayne@69: // the "End generated createXXX methods" comment is auto generated code jpayne@69: // and must not be edited manually. For instructions on how to correctly jpayne@69: // update this code, refer to: jpayne@69: // http://site.icu-project.org/design/formatting/measureformat/updating-measure-unit jpayne@69: // jpayne@69: // Start generated createXXX methods jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of acceleration: g-force. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getGForce()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createGForce(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of acceleration: g-force. jpayne@69: * Also see {@link #createGForce()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getGForce(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of acceleration: meter-per-square-second. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMeterPerSecondSquared()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createMeterPerSecondSquared(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of acceleration: meter-per-square-second. jpayne@69: * Also see {@link #createMeterPerSecondSquared()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMeterPerSecondSquared(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of angle: arc-minute. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getArcMinute()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createArcMinute(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of angle: arc-minute. jpayne@69: * Also see {@link #createArcMinute()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getArcMinute(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of angle: arc-second. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getArcSecond()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createArcSecond(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of angle: arc-second. jpayne@69: * Also see {@link #createArcSecond()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getArcSecond(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of angle: degree. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getDegree()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createDegree(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of angle: degree. jpayne@69: * Also see {@link #createDegree()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getDegree(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of angle: radian. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getRadian()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createRadian(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of angle: radian. jpayne@69: * Also see {@link #createRadian()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getRadian(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of angle: revolution. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getRevolutionAngle()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 56 jpayne@69: */ jpayne@69: static MeasureUnit *createRevolutionAngle(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of angle: revolution. jpayne@69: * Also see {@link #createRevolutionAngle()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getRevolutionAngle(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of area: acre. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getAcre()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createAcre(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of area: acre. jpayne@69: * Also see {@link #createAcre()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getAcre(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of area: dunam. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getDunam()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createDunam(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of area: dunam. jpayne@69: * Also see {@link #createDunam()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getDunam(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of area: hectare. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getHectare()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createHectare(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of area: hectare. jpayne@69: * Also see {@link #createHectare()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getHectare(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of area: square-centimeter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getSquareCentimeter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createSquareCentimeter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of area: square-centimeter. jpayne@69: * Also see {@link #createSquareCentimeter()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getSquareCentimeter(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of area: square-foot. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getSquareFoot()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createSquareFoot(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of area: square-foot. jpayne@69: * Also see {@link #createSquareFoot()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getSquareFoot(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of area: square-inch. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getSquareInch()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createSquareInch(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of area: square-inch. jpayne@69: * Also see {@link #createSquareInch()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getSquareInch(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of area: square-kilometer. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getSquareKilometer()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createSquareKilometer(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of area: square-kilometer. jpayne@69: * Also see {@link #createSquareKilometer()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getSquareKilometer(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of area: square-meter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getSquareMeter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createSquareMeter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of area: square-meter. jpayne@69: * Also see {@link #createSquareMeter()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getSquareMeter(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of area: square-mile. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getSquareMile()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createSquareMile(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of area: square-mile. jpayne@69: * Also see {@link #createSquareMile()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getSquareMile(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of area: square-yard. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getSquareYard()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createSquareYard(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of area: square-yard. jpayne@69: * Also see {@link #createSquareYard()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getSquareYard(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of concentr: karat. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getKarat()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createKarat(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of concentr: karat. jpayne@69: * Also see {@link #createKarat()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getKarat(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of concentr: milligram-per-deciliter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMilligramPerDeciliter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 57 jpayne@69: */ jpayne@69: static MeasureUnit *createMilligramPerDeciliter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of concentr: milligram-per-deciliter. jpayne@69: * Also see {@link #createMilligramPerDeciliter()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMilligramPerDeciliter(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of concentr: millimole-per-liter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMillimolePerLiter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 57 jpayne@69: */ jpayne@69: static MeasureUnit *createMillimolePerLiter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of concentr: millimole-per-liter. jpayne@69: * Also see {@link #createMillimolePerLiter()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMillimolePerLiter(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of concentr: mole. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMole()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createMole(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of concentr: mole. jpayne@69: * Also see {@link #createMole()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMole(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of concentr: permillion. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getPartPerMillion()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 57 jpayne@69: */ jpayne@69: static MeasureUnit *createPartPerMillion(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of concentr: permillion. jpayne@69: * Also see {@link #createPartPerMillion()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getPartPerMillion(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of concentr: percent. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getPercent()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 63 jpayne@69: */ jpayne@69: static MeasureUnit *createPercent(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of concentr: percent. jpayne@69: * Also see {@link #createPercent()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getPercent(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of concentr: permille. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getPermille()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 63 jpayne@69: */ jpayne@69: static MeasureUnit *createPermille(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of concentr: permille. jpayne@69: * Also see {@link #createPermille()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getPermille(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of concentr: permyriad. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getPermyriad()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createPermyriad(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of concentr: permyriad. jpayne@69: * Also see {@link #createPermyriad()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getPermyriad(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of consumption: liter-per-100-kilometer. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getLiterPer100Kilometers()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 56 jpayne@69: */ jpayne@69: static MeasureUnit *createLiterPer100Kilometers(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of consumption: liter-per-100-kilometer. jpayne@69: * Also see {@link #createLiterPer100Kilometers()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getLiterPer100Kilometers(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of consumption: liter-per-kilometer. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getLiterPerKilometer()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createLiterPerKilometer(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of consumption: liter-per-kilometer. jpayne@69: * Also see {@link #createLiterPerKilometer()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getLiterPerKilometer(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of consumption: mile-per-gallon. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMilePerGallon()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createMilePerGallon(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of consumption: mile-per-gallon. jpayne@69: * Also see {@link #createMilePerGallon()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMilePerGallon(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of consumption: mile-per-gallon-imperial. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMilePerGallonImperial()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 57 jpayne@69: */ jpayne@69: static MeasureUnit *createMilePerGallonImperial(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of consumption: mile-per-gallon-imperial. jpayne@69: * Also see {@link #createMilePerGallonImperial()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMilePerGallonImperial(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of digital: bit. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getBit()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createBit(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of digital: bit. jpayne@69: * Also see {@link #createBit()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getBit(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of digital: byte. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getByte()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createByte(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of digital: byte. jpayne@69: * Also see {@link #createByte()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getByte(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of digital: gigabit. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getGigabit()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createGigabit(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of digital: gigabit. jpayne@69: * Also see {@link #createGigabit()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getGigabit(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of digital: gigabyte. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getGigabyte()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createGigabyte(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of digital: gigabyte. jpayne@69: * Also see {@link #createGigabyte()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getGigabyte(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of digital: kilobit. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getKilobit()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createKilobit(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of digital: kilobit. jpayne@69: * Also see {@link #createKilobit()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getKilobit(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of digital: kilobyte. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getKilobyte()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createKilobyte(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of digital: kilobyte. jpayne@69: * Also see {@link #createKilobyte()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getKilobyte(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of digital: megabit. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMegabit()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createMegabit(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of digital: megabit. jpayne@69: * Also see {@link #createMegabit()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMegabit(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of digital: megabyte. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMegabyte()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createMegabyte(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of digital: megabyte. jpayne@69: * Also see {@link #createMegabyte()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMegabyte(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of digital: petabyte. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getPetabyte()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 63 jpayne@69: */ jpayne@69: static MeasureUnit *createPetabyte(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of digital: petabyte. jpayne@69: * Also see {@link #createPetabyte()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getPetabyte(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of digital: terabit. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getTerabit()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createTerabit(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of digital: terabit. jpayne@69: * Also see {@link #createTerabit()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getTerabit(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of digital: terabyte. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getTerabyte()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createTerabyte(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of digital: terabyte. jpayne@69: * Also see {@link #createTerabyte()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getTerabyte(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of duration: century. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getCentury()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 56 jpayne@69: */ jpayne@69: static MeasureUnit *createCentury(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of duration: century. jpayne@69: * Also see {@link #createCentury()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getCentury(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of duration: day. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getDay()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createDay(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of duration: day. jpayne@69: * Also see {@link #createDay()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getDay(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of duration: day-person. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getDayPerson()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createDayPerson(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of duration: day-person. jpayne@69: * Also see {@link #createDayPerson()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getDayPerson(); jpayne@69: jpayne@69: #ifndef U_HIDE_DRAFT_API jpayne@69: /** jpayne@69: * Returns by pointer, unit of duration: decade. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getDecade()}. jpayne@69: * @param status ICU error code. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit *createDecade(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of duration: decade. jpayne@69: * Also see {@link #createDecade()}. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit getDecade(); jpayne@69: #endif /* U_HIDE_DRAFT_API */ jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of duration: hour. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getHour()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createHour(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of duration: hour. jpayne@69: * Also see {@link #createHour()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getHour(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of duration: microsecond. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMicrosecond()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createMicrosecond(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of duration: microsecond. jpayne@69: * Also see {@link #createMicrosecond()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMicrosecond(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of duration: millisecond. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMillisecond()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createMillisecond(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of duration: millisecond. jpayne@69: * Also see {@link #createMillisecond()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMillisecond(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of duration: minute. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMinute()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createMinute(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of duration: minute. jpayne@69: * Also see {@link #createMinute()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMinute(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of duration: month. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMonth()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createMonth(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of duration: month. jpayne@69: * Also see {@link #createMonth()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMonth(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of duration: month-person. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMonthPerson()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createMonthPerson(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of duration: month-person. jpayne@69: * Also see {@link #createMonthPerson()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMonthPerson(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of duration: nanosecond. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getNanosecond()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createNanosecond(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of duration: nanosecond. jpayne@69: * Also see {@link #createNanosecond()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getNanosecond(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of duration: second. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getSecond()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createSecond(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of duration: second. jpayne@69: * Also see {@link #createSecond()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getSecond(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of duration: week. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getWeek()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createWeek(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of duration: week. jpayne@69: * Also see {@link #createWeek()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getWeek(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of duration: week-person. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getWeekPerson()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createWeekPerson(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of duration: week-person. jpayne@69: * Also see {@link #createWeekPerson()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getWeekPerson(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of duration: year. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getYear()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createYear(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of duration: year. jpayne@69: * Also see {@link #createYear()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getYear(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of duration: year-person. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getYearPerson()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createYearPerson(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of duration: year-person. jpayne@69: * Also see {@link #createYearPerson()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getYearPerson(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of electric: ampere. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getAmpere()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createAmpere(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of electric: ampere. jpayne@69: * Also see {@link #createAmpere()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getAmpere(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of electric: milliampere. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMilliampere()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createMilliampere(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of electric: milliampere. jpayne@69: * Also see {@link #createMilliampere()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMilliampere(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of electric: ohm. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getOhm()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createOhm(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of electric: ohm. jpayne@69: * Also see {@link #createOhm()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getOhm(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of electric: volt. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getVolt()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createVolt(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of electric: volt. jpayne@69: * Also see {@link #createVolt()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getVolt(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of energy: british-thermal-unit. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getBritishThermalUnit()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createBritishThermalUnit(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of energy: british-thermal-unit. jpayne@69: * Also see {@link #createBritishThermalUnit()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getBritishThermalUnit(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of energy: calorie. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getCalorie()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createCalorie(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of energy: calorie. jpayne@69: * Also see {@link #createCalorie()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getCalorie(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of energy: electronvolt. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getElectronvolt()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createElectronvolt(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of energy: electronvolt. jpayne@69: * Also see {@link #createElectronvolt()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getElectronvolt(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of energy: foodcalorie. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getFoodcalorie()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createFoodcalorie(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of energy: foodcalorie. jpayne@69: * Also see {@link #createFoodcalorie()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getFoodcalorie(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of energy: joule. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getJoule()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createJoule(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of energy: joule. jpayne@69: * Also see {@link #createJoule()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getJoule(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of energy: kilocalorie. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getKilocalorie()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createKilocalorie(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of energy: kilocalorie. jpayne@69: * Also see {@link #createKilocalorie()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getKilocalorie(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of energy: kilojoule. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getKilojoule()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createKilojoule(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of energy: kilojoule. jpayne@69: * Also see {@link #createKilojoule()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getKilojoule(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of energy: kilowatt-hour. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getKilowattHour()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createKilowattHour(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of energy: kilowatt-hour. jpayne@69: * Also see {@link #createKilowattHour()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getKilowattHour(); jpayne@69: jpayne@69: #ifndef U_HIDE_DRAFT_API jpayne@69: /** jpayne@69: * Returns by pointer, unit of energy: therm-us. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getThermUs()}. jpayne@69: * @param status ICU error code. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit *createThermUs(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of energy: therm-us. jpayne@69: * Also see {@link #createThermUs()}. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit getThermUs(); jpayne@69: #endif /* U_HIDE_DRAFT_API */ jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of force: newton. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getNewton()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createNewton(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of force: newton. jpayne@69: * Also see {@link #createNewton()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getNewton(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of force: pound-force. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getPoundForce()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createPoundForce(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of force: pound-force. jpayne@69: * Also see {@link #createPoundForce()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getPoundForce(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of frequency: gigahertz. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getGigahertz()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createGigahertz(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of frequency: gigahertz. jpayne@69: * Also see {@link #createGigahertz()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getGigahertz(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of frequency: hertz. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getHertz()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createHertz(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of frequency: hertz. jpayne@69: * Also see {@link #createHertz()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getHertz(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of frequency: kilohertz. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getKilohertz()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createKilohertz(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of frequency: kilohertz. jpayne@69: * Also see {@link #createKilohertz()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getKilohertz(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of frequency: megahertz. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMegahertz()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createMegahertz(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of frequency: megahertz. jpayne@69: * Also see {@link #createMegahertz()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMegahertz(); jpayne@69: jpayne@69: #ifndef U_HIDE_DRAFT_API jpayne@69: /** jpayne@69: * Returns by pointer, unit of graphics: dot-per-centimeter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getDotPerCentimeter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit *createDotPerCentimeter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of graphics: dot-per-centimeter. jpayne@69: * Also see {@link #createDotPerCentimeter()}. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit getDotPerCentimeter(); jpayne@69: #endif /* U_HIDE_DRAFT_API */ jpayne@69: jpayne@69: #ifndef U_HIDE_DRAFT_API jpayne@69: /** jpayne@69: * Returns by pointer, unit of graphics: dot-per-inch. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getDotPerInch()}. jpayne@69: * @param status ICU error code. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit *createDotPerInch(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of graphics: dot-per-inch. jpayne@69: * Also see {@link #createDotPerInch()}. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit getDotPerInch(); jpayne@69: #endif /* U_HIDE_DRAFT_API */ jpayne@69: jpayne@69: #ifndef U_HIDE_DRAFT_API jpayne@69: /** jpayne@69: * Returns by pointer, unit of graphics: em. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getEm()}. jpayne@69: * @param status ICU error code. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit *createEm(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of graphics: em. jpayne@69: * Also see {@link #createEm()}. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit getEm(); jpayne@69: #endif /* U_HIDE_DRAFT_API */ jpayne@69: jpayne@69: #ifndef U_HIDE_DRAFT_API jpayne@69: /** jpayne@69: * Returns by pointer, unit of graphics: megapixel. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMegapixel()}. jpayne@69: * @param status ICU error code. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit *createMegapixel(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of graphics: megapixel. jpayne@69: * Also see {@link #createMegapixel()}. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit getMegapixel(); jpayne@69: #endif /* U_HIDE_DRAFT_API */ jpayne@69: jpayne@69: #ifndef U_HIDE_DRAFT_API jpayne@69: /** jpayne@69: * Returns by pointer, unit of graphics: pixel. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getPixel()}. jpayne@69: * @param status ICU error code. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit *createPixel(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of graphics: pixel. jpayne@69: * Also see {@link #createPixel()}. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit getPixel(); jpayne@69: #endif /* U_HIDE_DRAFT_API */ jpayne@69: jpayne@69: #ifndef U_HIDE_DRAFT_API jpayne@69: /** jpayne@69: * Returns by pointer, unit of graphics: pixel-per-centimeter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getPixelPerCentimeter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit *createPixelPerCentimeter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of graphics: pixel-per-centimeter. jpayne@69: * Also see {@link #createPixelPerCentimeter()}. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit getPixelPerCentimeter(); jpayne@69: #endif /* U_HIDE_DRAFT_API */ jpayne@69: jpayne@69: #ifndef U_HIDE_DRAFT_API jpayne@69: /** jpayne@69: * Returns by pointer, unit of graphics: pixel-per-inch. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getPixelPerInch()}. jpayne@69: * @param status ICU error code. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit *createPixelPerInch(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of graphics: pixel-per-inch. jpayne@69: * Also see {@link #createPixelPerInch()}. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit getPixelPerInch(); jpayne@69: #endif /* U_HIDE_DRAFT_API */ jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: astronomical-unit. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getAstronomicalUnit()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createAstronomicalUnit(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: astronomical-unit. jpayne@69: * Also see {@link #createAstronomicalUnit()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getAstronomicalUnit(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: centimeter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getCentimeter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createCentimeter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: centimeter. jpayne@69: * Also see {@link #createCentimeter()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getCentimeter(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: decimeter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getDecimeter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createDecimeter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: decimeter. jpayne@69: * Also see {@link #createDecimeter()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getDecimeter(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: fathom. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getFathom()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createFathom(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: fathom. jpayne@69: * Also see {@link #createFathom()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getFathom(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: foot. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getFoot()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createFoot(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: foot. jpayne@69: * Also see {@link #createFoot()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getFoot(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: furlong. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getFurlong()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createFurlong(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: furlong. jpayne@69: * Also see {@link #createFurlong()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getFurlong(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: inch. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getInch()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createInch(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: inch. jpayne@69: * Also see {@link #createInch()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getInch(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: kilometer. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getKilometer()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createKilometer(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: kilometer. jpayne@69: * Also see {@link #createKilometer()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getKilometer(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: light-year. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getLightYear()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createLightYear(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: light-year. jpayne@69: * Also see {@link #createLightYear()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getLightYear(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: meter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMeter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createMeter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: meter. jpayne@69: * Also see {@link #createMeter()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMeter(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: micrometer. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMicrometer()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createMicrometer(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: micrometer. jpayne@69: * Also see {@link #createMicrometer()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMicrometer(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: mile. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMile()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createMile(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: mile. jpayne@69: * Also see {@link #createMile()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMile(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: mile-scandinavian. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMileScandinavian()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 56 jpayne@69: */ jpayne@69: static MeasureUnit *createMileScandinavian(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: mile-scandinavian. jpayne@69: * Also see {@link #createMileScandinavian()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMileScandinavian(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: millimeter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMillimeter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createMillimeter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: millimeter. jpayne@69: * Also see {@link #createMillimeter()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMillimeter(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: nanometer. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getNanometer()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createNanometer(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: nanometer. jpayne@69: * Also see {@link #createNanometer()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getNanometer(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: nautical-mile. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getNauticalMile()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createNauticalMile(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: nautical-mile. jpayne@69: * Also see {@link #createNauticalMile()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getNauticalMile(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: parsec. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getParsec()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createParsec(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: parsec. jpayne@69: * Also see {@link #createParsec()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getParsec(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: picometer. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getPicometer()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createPicometer(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: picometer. jpayne@69: * Also see {@link #createPicometer()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getPicometer(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: point. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getPoint()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 59 jpayne@69: */ jpayne@69: static MeasureUnit *createPoint(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: point. jpayne@69: * Also see {@link #createPoint()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getPoint(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: solar-radius. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getSolarRadius()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createSolarRadius(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: solar-radius. jpayne@69: * Also see {@link #createSolarRadius()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getSolarRadius(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of length: yard. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getYard()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createYard(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of length: yard. jpayne@69: * Also see {@link #createYard()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getYard(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of light: lux. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getLux()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createLux(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of light: lux. jpayne@69: * Also see {@link #createLux()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getLux(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of light: solar-luminosity. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getSolarLuminosity()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createSolarLuminosity(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of light: solar-luminosity. jpayne@69: * Also see {@link #createSolarLuminosity()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getSolarLuminosity(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of mass: carat. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getCarat()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createCarat(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of mass: carat. jpayne@69: * Also see {@link #createCarat()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getCarat(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of mass: dalton. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getDalton()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createDalton(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of mass: dalton. jpayne@69: * Also see {@link #createDalton()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getDalton(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of mass: earth-mass. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getEarthMass()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createEarthMass(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of mass: earth-mass. jpayne@69: * Also see {@link #createEarthMass()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getEarthMass(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of mass: gram. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getGram()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createGram(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of mass: gram. jpayne@69: * Also see {@link #createGram()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getGram(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of mass: kilogram. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getKilogram()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createKilogram(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of mass: kilogram. jpayne@69: * Also see {@link #createKilogram()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getKilogram(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of mass: metric-ton. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMetricTon()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createMetricTon(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of mass: metric-ton. jpayne@69: * Also see {@link #createMetricTon()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMetricTon(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of mass: microgram. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMicrogram()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createMicrogram(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of mass: microgram. jpayne@69: * Also see {@link #createMicrogram()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMicrogram(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of mass: milligram. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMilligram()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createMilligram(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of mass: milligram. jpayne@69: * Also see {@link #createMilligram()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMilligram(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of mass: ounce. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getOunce()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createOunce(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of mass: ounce. jpayne@69: * Also see {@link #createOunce()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getOunce(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of mass: ounce-troy. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getOunceTroy()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createOunceTroy(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of mass: ounce-troy. jpayne@69: * Also see {@link #createOunceTroy()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getOunceTroy(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of mass: pound. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getPound()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createPound(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of mass: pound. jpayne@69: * Also see {@link #createPound()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getPound(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of mass: solar-mass. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getSolarMass()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createSolarMass(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of mass: solar-mass. jpayne@69: * Also see {@link #createSolarMass()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getSolarMass(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of mass: stone. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getStone()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createStone(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of mass: stone. jpayne@69: * Also see {@link #createStone()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getStone(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of mass: ton. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getTon()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createTon(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of mass: ton. jpayne@69: * Also see {@link #createTon()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getTon(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of power: gigawatt. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getGigawatt()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createGigawatt(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of power: gigawatt. jpayne@69: * Also see {@link #createGigawatt()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getGigawatt(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of power: horsepower. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getHorsepower()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createHorsepower(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of power: horsepower. jpayne@69: * Also see {@link #createHorsepower()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getHorsepower(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of power: kilowatt. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getKilowatt()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createKilowatt(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of power: kilowatt. jpayne@69: * Also see {@link #createKilowatt()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getKilowatt(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of power: megawatt. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMegawatt()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createMegawatt(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of power: megawatt. jpayne@69: * Also see {@link #createMegawatt()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMegawatt(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of power: milliwatt. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMilliwatt()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createMilliwatt(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of power: milliwatt. jpayne@69: * Also see {@link #createMilliwatt()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMilliwatt(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of power: watt. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getWatt()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createWatt(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of power: watt. jpayne@69: * Also see {@link #createWatt()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getWatt(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of pressure: atmosphere. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getAtmosphere()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 63 jpayne@69: */ jpayne@69: static MeasureUnit *createAtmosphere(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of pressure: atmosphere. jpayne@69: * Also see {@link #createAtmosphere()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getAtmosphere(); jpayne@69: jpayne@69: #ifndef U_HIDE_DRAFT_API jpayne@69: /** jpayne@69: * Returns by pointer, unit of pressure: bar. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getBar()}. jpayne@69: * @param status ICU error code. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit *createBar(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of pressure: bar. jpayne@69: * Also see {@link #createBar()}. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit getBar(); jpayne@69: #endif /* U_HIDE_DRAFT_API */ jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of pressure: hectopascal. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getHectopascal()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createHectopascal(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of pressure: hectopascal. jpayne@69: * Also see {@link #createHectopascal()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getHectopascal(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of pressure: inch-ofhg. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getInchHg()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createInchHg(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of pressure: inch-ofhg. jpayne@69: * Also see {@link #createInchHg()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getInchHg(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of pressure: kilopascal. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getKilopascal()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createKilopascal(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of pressure: kilopascal. jpayne@69: * Also see {@link #createKilopascal()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getKilopascal(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of pressure: megapascal. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMegapascal()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createMegapascal(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of pressure: megapascal. jpayne@69: * Also see {@link #createMegapascal()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMegapascal(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of pressure: millibar. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMillibar()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createMillibar(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of pressure: millibar. jpayne@69: * Also see {@link #createMillibar()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMillibar(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of pressure: millimeter-ofhg. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMillimeterOfMercury()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createMillimeterOfMercury(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of pressure: millimeter-ofhg. jpayne@69: * Also see {@link #createMillimeterOfMercury()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMillimeterOfMercury(); jpayne@69: jpayne@69: #ifndef U_HIDE_DRAFT_API jpayne@69: /** jpayne@69: * Returns by pointer, unit of pressure: pascal. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getPascal()}. jpayne@69: * @param status ICU error code. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit *createPascal(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of pressure: pascal. jpayne@69: * Also see {@link #createPascal()}. jpayne@69: * @draft ICU 65 jpayne@69: */ jpayne@69: static MeasureUnit getPascal(); jpayne@69: #endif /* U_HIDE_DRAFT_API */ jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of pressure: pound-force-per-square-inch. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getPoundPerSquareInch()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createPoundPerSquareInch(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of pressure: pound-force-per-square-inch. jpayne@69: * Also see {@link #createPoundPerSquareInch()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getPoundPerSquareInch(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of speed: kilometer-per-hour. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getKilometerPerHour()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createKilometerPerHour(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of speed: kilometer-per-hour. jpayne@69: * Also see {@link #createKilometerPerHour()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getKilometerPerHour(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of speed: knot. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getKnot()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 56 jpayne@69: */ jpayne@69: static MeasureUnit *createKnot(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of speed: knot. jpayne@69: * Also see {@link #createKnot()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getKnot(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of speed: meter-per-second. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMeterPerSecond()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createMeterPerSecond(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of speed: meter-per-second. jpayne@69: * Also see {@link #createMeterPerSecond()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMeterPerSecond(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of speed: mile-per-hour. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMilePerHour()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createMilePerHour(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of speed: mile-per-hour. jpayne@69: * Also see {@link #createMilePerHour()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMilePerHour(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of temperature: celsius. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getCelsius()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createCelsius(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of temperature: celsius. jpayne@69: * Also see {@link #createCelsius()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getCelsius(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of temperature: fahrenheit. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getFahrenheit()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createFahrenheit(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of temperature: fahrenheit. jpayne@69: * Also see {@link #createFahrenheit()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getFahrenheit(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of temperature: generic. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getGenericTemperature()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 56 jpayne@69: */ jpayne@69: static MeasureUnit *createGenericTemperature(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of temperature: generic. jpayne@69: * Also see {@link #createGenericTemperature()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getGenericTemperature(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of temperature: kelvin. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getKelvin()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createKelvin(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of temperature: kelvin. jpayne@69: * Also see {@link #createKelvin()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getKelvin(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of torque: newton-meter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getNewtonMeter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createNewtonMeter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of torque: newton-meter. jpayne@69: * Also see {@link #createNewtonMeter()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getNewtonMeter(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of torque: pound-force-foot. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getPoundFoot()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createPoundFoot(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of torque: pound-force-foot. jpayne@69: * Also see {@link #createPoundFoot()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getPoundFoot(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: acre-foot. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getAcreFoot()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createAcreFoot(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: acre-foot. jpayne@69: * Also see {@link #createAcreFoot()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getAcreFoot(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: barrel. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getBarrel()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createBarrel(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: barrel. jpayne@69: * Also see {@link #createBarrel()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getBarrel(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: bushel. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getBushel()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createBushel(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: bushel. jpayne@69: * Also see {@link #createBushel()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getBushel(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: centiliter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getCentiliter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createCentiliter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: centiliter. jpayne@69: * Also see {@link #createCentiliter()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getCentiliter(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: cubic-centimeter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getCubicCentimeter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createCubicCentimeter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: cubic-centimeter. jpayne@69: * Also see {@link #createCubicCentimeter()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getCubicCentimeter(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: cubic-foot. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getCubicFoot()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createCubicFoot(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: cubic-foot. jpayne@69: * Also see {@link #createCubicFoot()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getCubicFoot(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: cubic-inch. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getCubicInch()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createCubicInch(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: cubic-inch. jpayne@69: * Also see {@link #createCubicInch()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getCubicInch(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: cubic-kilometer. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getCubicKilometer()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createCubicKilometer(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: cubic-kilometer. jpayne@69: * Also see {@link #createCubicKilometer()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getCubicKilometer(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: cubic-meter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getCubicMeter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createCubicMeter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: cubic-meter. jpayne@69: * Also see {@link #createCubicMeter()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getCubicMeter(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: cubic-mile. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getCubicMile()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createCubicMile(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: cubic-mile. jpayne@69: * Also see {@link #createCubicMile()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getCubicMile(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: cubic-yard. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getCubicYard()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createCubicYard(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: cubic-yard. jpayne@69: * Also see {@link #createCubicYard()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getCubicYard(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: cup. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getCup()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createCup(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: cup. jpayne@69: * Also see {@link #createCup()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getCup(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: cup-metric. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getCupMetric()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 56 jpayne@69: */ jpayne@69: static MeasureUnit *createCupMetric(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: cup-metric. jpayne@69: * Also see {@link #createCupMetric()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getCupMetric(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: deciliter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getDeciliter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createDeciliter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: deciliter. jpayne@69: * Also see {@link #createDeciliter()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getDeciliter(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: fluid-ounce. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getFluidOunce()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createFluidOunce(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: fluid-ounce. jpayne@69: * Also see {@link #createFluidOunce()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getFluidOunce(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: fluid-ounce-imperial. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getFluidOunceImperial()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit *createFluidOunceImperial(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: fluid-ounce-imperial. jpayne@69: * Also see {@link #createFluidOunceImperial()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getFluidOunceImperial(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: gallon. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getGallon()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createGallon(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: gallon. jpayne@69: * Also see {@link #createGallon()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getGallon(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: gallon-imperial. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getGallonImperial()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 57 jpayne@69: */ jpayne@69: static MeasureUnit *createGallonImperial(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: gallon-imperial. jpayne@69: * Also see {@link #createGallonImperial()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getGallonImperial(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: hectoliter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getHectoliter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createHectoliter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: hectoliter. jpayne@69: * Also see {@link #createHectoliter()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getHectoliter(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: liter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getLiter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 53 jpayne@69: */ jpayne@69: static MeasureUnit *createLiter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: liter. jpayne@69: * Also see {@link #createLiter()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getLiter(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: megaliter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMegaliter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createMegaliter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: megaliter. jpayne@69: * Also see {@link #createMegaliter()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMegaliter(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: milliliter. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getMilliliter()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createMilliliter(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: milliliter. jpayne@69: * Also see {@link #createMilliliter()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getMilliliter(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: pint. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getPint()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createPint(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: pint. jpayne@69: * Also see {@link #createPint()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getPint(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: pint-metric. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getPintMetric()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 56 jpayne@69: */ jpayne@69: static MeasureUnit *createPintMetric(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: pint-metric. jpayne@69: * Also see {@link #createPintMetric()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getPintMetric(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: quart. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getQuart()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createQuart(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: quart. jpayne@69: * Also see {@link #createQuart()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getQuart(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: tablespoon. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getTablespoon()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createTablespoon(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: tablespoon. jpayne@69: * Also see {@link #createTablespoon()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getTablespoon(); jpayne@69: jpayne@69: /** jpayne@69: * Returns by pointer, unit of volume: teaspoon. jpayne@69: * Caller owns returned value and must free it. jpayne@69: * Also see {@link #getTeaspoon()}. jpayne@69: * @param status ICU error code. jpayne@69: * @stable ICU 54 jpayne@69: */ jpayne@69: static MeasureUnit *createTeaspoon(UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Returns by value, unit of volume: teaspoon. jpayne@69: * Also see {@link #createTeaspoon()}. jpayne@69: * @stable ICU 64 jpayne@69: */ jpayne@69: static MeasureUnit getTeaspoon(); jpayne@69: jpayne@69: jpayne@69: // End generated createXXX methods jpayne@69: jpayne@69: protected: jpayne@69: jpayne@69: #ifndef U_HIDE_INTERNAL_API jpayne@69: /** jpayne@69: * For ICU use only. jpayne@69: * @internal jpayne@69: */ jpayne@69: void initTime(const char *timeId); jpayne@69: jpayne@69: /** jpayne@69: * For ICU use only. jpayne@69: * @internal jpayne@69: */ jpayne@69: void initCurrency(StringPiece isoCurrency); jpayne@69: jpayne@69: /** jpayne@69: * For ICU use only. jpayne@69: * @internal jpayne@69: */ jpayne@69: void initNoUnit(const char *subtype); jpayne@69: jpayne@69: #endif /* U_HIDE_INTERNAL_API */ jpayne@69: jpayne@69: private: jpayne@69: jpayne@69: // Used by new draft APIs in ICU 67. If non-null, fImpl is owned by the jpayne@69: // MeasureUnit. jpayne@69: MeasureUnitImpl* fImpl; jpayne@69: jpayne@69: // An index into a static string list in measunit.cpp. If set to -1, fImpl jpayne@69: // is in use instead of fTypeId and fSubTypeId. jpayne@69: int16_t fSubTypeId; jpayne@69: // An index into a static string list in measunit.cpp. If set to -1, fImpl jpayne@69: // is in use instead of fTypeId and fSubTypeId. jpayne@69: int8_t fTypeId; jpayne@69: jpayne@69: MeasureUnit(int32_t typeId, int32_t subTypeId); jpayne@69: MeasureUnit(MeasureUnitImpl&& impl); jpayne@69: void setTo(int32_t typeId, int32_t subTypeId); jpayne@69: int32_t getOffset() const; jpayne@69: static MeasureUnit *create(int typeId, int subTypeId, UErrorCode &status); jpayne@69: jpayne@69: /** jpayne@69: * Sets output's typeId and subTypeId according to subType, if subType is a jpayne@69: * valid/known identifier. jpayne@69: * jpayne@69: * @return Whether subType is known to ICU. If false, output was not jpayne@69: * modified. jpayne@69: */ jpayne@69: static bool findBySubType(StringPiece subType, MeasureUnit* output); jpayne@69: jpayne@69: friend struct MeasureUnitImpl; jpayne@69: }; jpayne@69: jpayne@69: U_NAMESPACE_END jpayne@69: jpayne@69: #endif // !UNCONFIG_NO_FORMATTING jpayne@69: jpayne@69: #endif /* U_SHOW_CPLUSPLUS_API */ jpayne@69: jpayne@69: #endif // __MEASUREUNIT_H__