ICU 60.2 60.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Public Member Functions | Friends
icu::number::UnlocalizedNumberFormatter Class Reference

A NumberFormatter that does not yet have a locale. More...

`#include <numberformatter.h>`

Inheritance diagram for icu::number::UnlocalizedNumberFormatter:

## Public Member Functions
LocalizedNumberFormatter | locale (const icu::Locale &locale) const
| Associate the given locale with the number formatter. More...
| UnlocalizedNumberFormatter (const UnlocalizedNumberFormatter &other)
| Returns a copy of this UnlocalizedNumberFormatter. More...
Public Member Functions inherited from icu::number::NumberFormatterSettings< Derived >
Derived | notation (const Notation &notation) const
| Specifies the notation style (simple, scientific, or compact) for rendering numbers. More...
Derived | unit (const icu::MeasureUnit &unit) const
| Specifies the unit (unit of measure, currency, or percent) to associate with rendered numbers. More...
Derived | adoptUnit (const icu::MeasureUnit *unit) const
| Like unit(), but takes ownership of a pointer. More...
Derived | rounding (const Rounder &rounder) const
| Specifies the rounding strategy to use when formatting numbers. More...
Derived | grouping (const Grouper &grouper) const
| Specifies the grouping strategy to use when formatting numbers. More...
Derived | integerWidth (const IntegerWidth &style) const
| Specifies the minimum and maximum number of digits to render before the decimal mark. More...
Derived | symbols (const DecimalFormatSymbols &symbols) const
| Specifies the symbols (decimal separator, grouping separator, percent sign, numerals, etc.) to use when rendering numbers. More...
Derived | adoptSymbols (const NumberingSystem *symbols) const
| Specifies that the given numbering system should be used when fetching symbols. More...
Derived | unitWidth (const UNumberUnitWidth &width) const
| Sets the width of the unit (measure unit or currency). More...
Derived | sign (const UNumberSignDisplay &width) const
| Sets the plus/minus sign display strategy. More...
Derived | decimal (const UNumberDecimalSeparatorDisplay &width) const
| Sets the decimal separator display strategy. More...
Derived | padding (const impl::Padder &padder) const
| Set the padding strategy. More...
Derived | threshold (int32_t threshold) const
| Internal fluent setter to support a custom regulation threshold. More...
UBool | copyErrorTo (UErrorCode &outErrorCode) const
| Sets the UErrorCode if an error occurred in the fluent chain. More...

## Friends
class | NumberFormatterSettings< UnlocalizedNumberFormatter >
class | NumberFormatter

## Additional Inherited Members
Protected Attributes inherited from icu::number::NumberFormatterSettings< Derived >
impl::MacroProps | fMacros

## Detailed Description

A NumberFormatter that does not yet have a locale.

In order to format numbers, a locale must be specified.

See also
  NumberFormatter

Draft:
  This API may be changed in the future versions and was introduced in ICU 60

Definition at line 1731 of file numberformatter.h.

## Constructor & Destructor Documentation

icu::number::UnlocalizedNumberFormatter::UnlocalizedNumberFormatter | ( | const UnlocalizedNumberFormatter & | other | ) |
| inline

Returns a copy of this UnlocalizedNumberFormatter.

Draft:
  This API may be changed in the future versions and was introduced in ICU 60

Definition at line 1758 of file numberformatter.h.

## Member Function Documentation

LocalizedNumberFormatter icu::number::UnlocalizedNumberFormatter::locale | ( | const icu::Locale & | locale | ) | const

Associate the given locale with the number formatter.

The locale is used for picking the appropriate symbols, formats, and other data for number display.

To use the Java default locale, call Locale::getDefault():

    NumberFormatter::with(). ... .locale(Locale::getDefault())

Parameters

  locale | The locale to use when loading data for number formatting.

Returns
  The fluent chain.

Draft:
  This API may be changed in the future versions and was introduced in ICU 60

The documentation for this class was generated from the following file:

- numberformatter.h