* Constructor.
* <p>
* <strong>NOTE:</strong> New users are strongly encouraged to use
- * {@link NumberFormatter} instead of NumberFormat.
+ * {@link icu::number::NumberFormatter} instead of NumberFormat.
* @stable ICU 53
*/
MeasureFormat(
* Constructor.
* <p>
* <strong>NOTE:</strong> New users are strongly encouraged to use
- * {@link NumberFormatter} instead of NumberFormat.
+ * {@link icu::number::NumberFormatter} instead of NumberFormat.
* @stable ICU 53
*/
MeasureFormat(
* formatted string is 3.5 meters per second.
* @param measure The measure object. In above example, 3.5 meters.
* @param perUnit The per unit. In above example, it is
- * *MeasureUnit::createSecond(status).
+ * `*%MeasureUnit::createSecond(status)`.
* @param appendTo formatted string appended here.
* @param pos the field position.
* @param status the error.
* @param unit The unit for which to get a display name.
* @param status the error.
* @return The display name in the locale and width specified in
- * {@link MeasureFormat#getInstance}, or null if there is no display name available
+ * the MeasureFormat constructor, or null if there is no display name available
* for the specified unit.
*
* @stable ICU 58
* locale.
* <p>
* <strong>NOTE:</strong> New users are strongly encouraged to use
- * {@link NumberFormatter} instead of NumberFormat.
+ * {@link icu::number::NumberFormatter} instead of NumberFormat.
* @param locale desired locale
* @param ec input-output error code
* @return a formatter object, or NULL upon error
* locale.
* <p>
* <strong>NOTE:</strong> New users are strongly encouraged to use
- * {@link NumberFormatter} instead of NumberFormat.
+ * {@link icu::number::NumberFormatter} instead of NumberFormat.
* @param ec input-output error code
* @return a formatter object, or NULL upon error
* @stable ICU 3.0
* ICU use only.
* @internal.
*/
- const NumberFormat &getNumberFormat() const;
+ const NumberFormat &getNumberFormatInternal() const;
+
+ /**
+ * ICU use only.
+ * Always returns the short form currency formatter.
+ * @internal.
+ */
+ const NumberFormat& getCurrencyFormatInternal() const;
/**
* ICU use only.
const MeasureFormatCacheData *cache;
const SharedNumberFormat *numberFormat;
const SharedPluralRules *pluralRules;
- UMeasureFormatWidth width;
+ UMeasureFormatWidth fWidth;
UBool stripPatternSpaces;
// Declared outside of MeasureFormatSharedData because ListFormatter
ListFormatter *listFormatter;
ListFormatter *listFormatterStd; // standard list style, option for display names; Apple specific
- const SimpleFormatter *getFormatterOrNull(
- const MeasureUnit &unit, UMeasureFormatWidth width, int32_t index) const;
-
- const SimpleFormatter *getFormatter(
- const MeasureUnit &unit, UMeasureFormatWidth width, int32_t index,
- UErrorCode &errorCode) const;
-
- const SimpleFormatter *getPluralFormatter(
- const MeasureUnit &unit, UMeasureFormatWidth width, int32_t index,
- UErrorCode &errorCode) const;
-
- const SimpleFormatter *getPerFormatter(
- UMeasureFormatWidth width,
- UErrorCode &status) const;
-
- int32_t withPerUnitAndAppend(
- const UnicodeString &formatted,
- const MeasureUnit &perUnit,
- UnicodeString &appendTo,
- UErrorCode &status) const;
-
UnicodeString &formatMeasure(
const Measure &measure,
const NumberFormat &nf,