public class DefaultNumberFormatFactory extends AbstractNumberFormatFactory
DecimalFormat
instance returned by calling
NumberFormat.getInstance(Locale)
by default. This instance supports parsing any number type generally and
will not perform special type-specific logic such as rounding or truncation.NumberFormat
,
DecimalFormat
Constructor and Description |
---|
DefaultNumberFormatFactory() |
Modifier and Type | Method and Description |
---|---|
protected java.text.NumberFormat |
getNumberFormat(java.util.Locale locale)
Subclasses should override to create the new NumberFormat instance.
|
java.lang.String |
getPattern()
The pattern to use to format number values.
|
void |
setPattern(java.lang.String pattern)
Sets the pattern for formatting numbers.
|
getLocale, getNumberFormat, setLocale
public java.lang.String getPattern()
public void setPattern(java.lang.String pattern)
pattern
- the format patternDecimalFormat
protected java.text.NumberFormat getNumberFormat(java.util.Locale locale)
AbstractNumberFormatFactory
getNumberFormat
in class AbstractNumberFormatFactory
locale
- the locale to use