APIdia Launch Partner
Top Description Inners Fields Constructors Methods
java.text

public final Class CompactNumberFormat

extends NumberFormat
Class Inheritance
Imports
java.io.IOException, .InvalidObjectException, .ObjectInputStream, java.math.BigDecimal, .BigInteger, .RoundingMode, java.util.ArrayList, .Arrays, .HashMap, .List, .Locale, .Map, .Objects, java.util.concurrent.atomic.AtomicInteger, .AtomicLong, java.util.regex.Matcher, .Pattern, java.util.stream.Collectors

CompactNumberFormat is a concrete subclass of NumberFormat that formats a decimal number in a localized compact form. Compact number formatting is designed for an environment with limited space. For example, displaying the formatted number 7M instead of 7,000,000.00 in the US locale. The CompactNumberFormat class is defined by LDML's specification for Compact Number Formats.

Getting a CompactNumberFormat

To get a compact number format, use one of the ways listed below.

If a standard compact format for a given locale and style is desired, it is recommended to use one of the NumberFormat factory methods listed above. To use an instance method defined by CompactNumberFormat, the NumberFormat returned by these factory methods should be type checked before converted to CompactNumberFormat. If the installed locale-sensitive service implementation does not support the given Locale, the parent locale chain will be looked up, and a Locale used that is supported.

Style

When using NumberFormat#getCompactNumberInstance(Locale, Style), a compact form can be retrieved with either a SHORT or LONG style. For example, a SHORT style compact number instance in the US locale formats 10000 as "10K". However, a LONG style instance in the same locale formats 10000 as "10 thousand".

Using CompactNumberFormat

The following is an example of formatting and parsing in a localized manner,
NumberFormat compactFormat = NumberFormat.getCompactNumberInstance(Locale.US, NumberFormat.Style.SHORT); compactFormat.format(1000); // returns "1K" compactFormat.parse("1K"); // returns 1000
NumberFormat compactFormat = NumberFormat.getCompactNumberInstance(Locale.US, NumberFormat.Style.SHORT);
compactFormat.format(1000); // returns "1K"
compactFormat.parse("1K"); // returns 1000

Formatting

The default formatting behavior returns a formatted string with no fractional digits, however users can use the setMinimumFractionDigits(int) method to include the fractional part. The number 1000.0 or 1000 is formatted as "1K" not "1.00K" (in the US locale). For this reason, the patterns provided for formatting contain only the minimum integer digits, prefix and/or suffix, but no fractional part. For example, patterns used are {"", "", "", 0K, 00K, ...}. If the pattern selected for formatting a number is "0" (special pattern), either explicit or defaulted, then the general number formatting provided by DecimalFormat for the specified locale is used.

Rounding

CompactNumberFormat provides rounding modes defined in java.math.RoundingMode for formatting. By default, it uses RoundingMode.HALF_EVEN.

Parsing

The default parsing behavior does not allow a grouping separator until grouping used is set to true by using setGroupingUsed(boolean). The parsing of the fractional part depends on the isParseIntegerOnly(). For example, if the parse integer only is set to true, then the fractional part is skipped.

Compact Number Patterns

The compactPatterns in CompactNumberFormat(decimalPattern, symbols, compactPatterns) are represented as a series of strings, where each string is a pattern that is used to format a range of numbers.

An example of the SHORT styled compact number patterns for the US locale is {"", "", "", "0K", "00K", "000K", "0M", "00M", "000M", "0B", "00B", "000B", "0T", "00T", "000T"}, ranging from 100 to 1014. There can be any number of patterns and they are strictly index based starting from the range 100. For example, in the above patterns, the pattern at index 3 ("0K") is used for formatting a number in the range: 1000 <= number < 10000, index 4 ("00K") for formatting a number the range: 10000 <= number < 100000, and so forth.

In most locales, patterns with the range 100-102 are empty strings, which implicitly means a special pattern "0". A special pattern "0" is used for any range which does not contain a compact pattern. This special pattern can appear explicitly for any specific range, or considered as a default pattern for an empty string.

Negative Subpatterns

A compact pattern contains a positive and negative subpattern separated by a subpattern boundary character ';', for example, "0K;-0K". Each subpattern has a prefix, minimum integer digits, and suffix. The negative subpattern is optional, if absent, then the positive subpattern prefixed with the minus sign '-' (U+002D HYPHEN-MINUS) is used as the negative subpattern. That is, "0K" alone is equivalent to "0K;-0K". If there is an explicit negative subpattern, it serves only to specify the negative prefix and suffix. The number of minimum integer digits, and other characteristics are all the same as the positive pattern. That means that "0K;-00K" produces precisely the same behavior as "0K;-0K". In lenient parsing mode, loose matching of the minus sign pattern is enabled, following the LDML’s loose matching specification.

Escaping Special Characters

Many characters in a compact pattern are taken literally, they are matched during parsing and output unchanged during formatting. Special characters, on the other hand, stand for other characters, strings, or classes of characters. These characters must be quoted using single quotes ' (U+0027) unless noted otherwise, if they are to appear in the prefix or suffix as literals. For example, 0क'.'.

Plurals

CompactNumberFormat support patterns for both singular and plural compact forms. For the plural form, the Pattern should consist of PluralPattern(s) separated by a space ' ' (U+0020) that are enumerated within a pair of curly brackets '{' (U+007B) and '}' (U+007D). In this format, each PluralPattern consists of its count, followed by a single colon ':' (U+003A) and a SimplePattern. As a space is reserved for separating subsequent PluralPatterns, it must be quoted to be used literally in either the prefix or suffix.

For example, while the pattern representing millions (106 ) in the US locale can be specified as the SimplePattern: "0 Million", for the German locale it can be specified as the PluralPattern: "{one:0' 'Million other:0' 'Millionen}".

A compact pattern has the following syntax, with count following LDML's Language Plural Rules:

Pattern:
        SimplePattern
        '{' PluralPattern [' ' PluralPattern]optional '}'
SimplePattern:
        PositivePattern
        PositivePattern [; NegativePattern]optional
PluralPattern:
        Count:SimplePattern
Count:
        "zero" / "one" / "two" / "few" / "many" / "other"
PositivePattern:
        Prefixoptional MinimumInteger Suffixoptional
NegativePattern:
       Prefixoptional MinimumInteger Suffixoptional
Prefix:
     Any characters except the special pattern characters
Suffix:
     Any characters except the special pattern characters
MinimumInteger:
     0
     0 MinimumInteger
Since
12
External Specification
https://www.unicode.org/reports/tr35
See Also
NumberFormat.Style, NumberFormat, DecimalFormat, Locale

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
CompactNumberFormat.Patterns

Abstraction of affix or number (represented by zeros) patterns for each "count" tag.

Field Summary

Modifier and TypeField and Description
private String[]
compactPatterns

The patterns for compact form of numbers for this CompactNumberFormat.

private static final String
private static final Pattern
private static final char
private static final char
private transient DecimalFormat
decimalFormat

A DecimalFormat used by this format for getting corresponding general number formatting behavior for compact numbers.

private final String
decimalPattern

The decimal pattern which is used for formatting the numbers matching special pattern "0".

private transient DecimalFormat
defaultDecimalFormat

A DecimalFormat used by this format for getting general number formatting behavior for the numbers which can't be represented as compact numbers.

private static final char
private transient DigitList
private transient List<Number>
divisors

List of divisors of this formatter's compact number patterns.

private static final String
private static final Pattern
private static final char
private byte
groupingSize

The number of digits between grouping separators in the integer portion of a compact number.

private static final char
private static final String
private static final String
private static final String
private transient List<CompactNumberFormat.Patterns>
private transient List<CompactNumberFormat.Patterns>
negativePrefixPatterns

List of negative prefix patterns of this formatter's compact number patterns.

private transient List<CompactNumberFormat.Patterns>
private transient List<CompactNumberFormat.Patterns>
negativeSuffixPatterns

List of negative suffix patterns of this formatter's compact number patterns.

private transient Pattern
numberPattern

RegEx to parse number part of a compact number text

private boolean
parseBigDecimal

Returns whether the parse(String, ParsePosition) method returns BigDecimal.

private boolean
parseStrict

True if this CompactNumberFormat will parse numbers with strict leniency.

private static final char
private static final char
private transient List<CompactNumberFormat.Patterns>
placeHolderPatterns

List of place holders that represent minimum integer digits at each index for each count.

private String
pluralRules

The pluralRules used in this compact number format.

private static final Pattern
private static final Pattern
PLURALS

Process the series of compact patterns to compute the series of prefixes, suffixes and their respective divisor value.

private transient List<CompactNumberFormat.Patterns>
private transient List<CompactNumberFormat.Patterns>
positivePrefixPatterns

List of positive prefix patterns of this formatter's compact number patterns.

private transient List<CompactNumberFormat.Patterns>
private transient List<CompactNumberFormat.Patterns>
positiveSuffixPatterns

List of positive suffix patterns of this formatter's compact number patterns.

private static final char
private static final int
RANGE_MULTIPLIER

Multiplier for compact pattern range.

private static final String
private static final Pattern
private RoundingMode
roundingMode

The RoundingMode used in this compact number format.

private transient Map<String, String>
rulesMap

The map for plural rules that maps LDML defined tags (e.g. "one") to its rule.

private static final char
private static final long
private static final String
SPECIAL_PATTERN

Special pattern used for compact numbers

private static final int
private static final int
private static final int
private DecimalFormatSymbols
symbols

The DecimalFormatSymbols object used by this format.

private static final String
private static final Pattern
private static final char
Inherited from java.text.NumberFormat:
currentSerialVersionFRACTION_FIELDINTEGER_FIELD

Constructor Summary

AccessConstructor and Description
public
CompactNumberFormat(String
a decimal pattern for general number formatting
decimalPattern
,
DecimalFormatSymbols
the set of symbols to be used
symbols
,
String[] compactPatterns)

Creates a CompactNumberFormat using the given decimal pattern, decimal format symbols and compact patterns.

public
CompactNumberFormat(String
a decimal pattern for general number formatting
decimalPattern
,
DecimalFormatSymbols
the set of symbols to be used
symbols
,
String[] compactPatterns, String
a String designating plural rules which associate the Count keyword, such as "one", and the actual integer number. Its syntax is defined in Unicode Consortium's Plural rules syntax
pluralRules
)

Creates a CompactNumberFormat using the given decimal pattern, decimal format symbols, compact patterns, and plural rules.

Method Summary

Modifier and TypeMethod and Description
private void
append(Format.StringBuf
the resulting string, where the text is to be appended
result
,
String
the text to append
string
,
Format.FieldDelegate
notified of the locations of sub fields
delegate
,
List<FieldPosition>
a list of FieldPosition in the given string
positions
)

Appends the string to the result.

private void
appendPrefix(Format.StringBuf
the resulting string, where the prefix is to be appended
result
,
String
prefix to append
prefix
,
Format.FieldDelegate
notified of the locations of NumberFormat.Field.SIGN and NumberFormat.Field.PREFIX fields
delegate
)

Appends the prefix to the result and also set the NumberFormat.Field.SIGN and NumberFormat.Field.PREFIX field positions.

private void
appendSuffix(Format.StringBuf
the resulting string, where the suffix is to be appended
result
,
String
suffix to append
suffix
,
Format.FieldDelegate
notified of the locations of NumberFormat.Field.SIGN and NumberFormat.Field.SUFFIX fields
delegate
)

Appends suffix to the result and also set the NumberFormat.Field.SIGN and NumberFormat.Field.SUFFIX field positions.

private void
applyPattern(String count, String
the compact pattern to be processed
pattern
,
int
index in the array of compact patterns
index
)

Process a compact pattern at a specific index

private Map<String, String>
buildPluralRulesMap()

Build the plural rules map.

private boolean
checkIncrement(double val, int index, double divisor)

public CompactNumberFormat

Returns:

a clone of this instance
clone
()

Overrides java.text.NumberFormat.clone.

Creates and returns a copy of this CompactNumberFormat instance.

private Number

Returns:

divisor value for the number matching the compact pattern at given patternIndex
computeDivisor
(String
string of 0s in compact pattern
minIntDigits
,
int
index of matched compact pattern
patternIndex
)

Computes the divisor using minimum integer digits and matched pattern index.

private Number

Returns:

the multiplier matching the prefix and suffix; -1 otherwise
computeParseMultiplier
(String
the string to parse
text
,
ParsePosition
the ParsePosition object representing the index and error index of the parse string
parsePosition
,
String
prefix extracted which needs to be matched to obtain the multiplier
matchedPrefix
,
boolean[]
upon return contains boolean status flags indicating whether the value is positive
status
,
boolean
based on the prefix parsed; whether the number is positive
gotPositive
,
boolean
based on the prefix parsed; whether the number is negative
gotNegative
,
double num)

Computes multiplier by matching the given matchedPrefix and suffix in the specified text from the lists of prefixes and suffixes extracted from compact patterns.

private Number

Returns:

the resulting value
convertIfNegative
(Number
parsed value
number
,
boolean[]
boolean status flags indicating whether the value is infinite and whether it is positive
status
,
boolean
whether the parsed number is Long.MIN
gotLongMin
)

Negate the parsed value if the positive status flag is false and the value is not a Long.MIN

public boolean

Returns:

true if this is equal to the other CompactNumberFormat
equals
(Object
the object to compare with
obj
)

Overrides java.text.NumberFormat.equals.

Compares the specified object with this CompactNumberFormat for equality.

private static double

Returns:

resulting double value
evalLOperand
(Matcher
Match result
expr
,
double
value to examine in double
input
)

Evaluates the left operand value.

private String

Returns:

an expanded affix
expandAffix
(String
a compact number pattern affix
pattern
)

Expands an affix pattern into a string of literals.

private void
public final StringBuffer

Returns:

the StringBuffer passed in as toAppendTo
format
(Object
the number to format
number
,
StringBuffer
the StringBuffer to which the formatted text is to be appended
toAppendTo
,
FieldPosition
keeps track on the position of the field within the returned string. For example, for formatting a number 123456789 in the US locale, if the given fieldPosition is NumberFormat#INTEGER_FIELD, the begin index and end index of fieldPosition will be set to 0 and 3, respectively for the output string 123M. Similarly, positions of the prefix and the suffix fields can be obtained using NumberFormat.Field#PREFIX and NumberFormat.Field#SUFFIX respectively.
fieldPosition
)

Overrides java.text.NumberFormat.format.

Formats a number to produce a string representing its compact form.

pack-priv Format.StringBuf
format(Object number, Format.StringBuf toAppendTo, FieldPosition fieldPosition)

Overrides java.text.NumberFormat.format.

public StringBuffer

Returns:

the StringBuffer passed in as result
format
(double
the double number to format
number
,
StringBuffer
where the text is to be appended
result
,
FieldPosition
keeps track on the position of the field within the returned string. For example, to format a number 1234567.89 in the US locale if the given fieldPosition is NumberFormat#INTEGER_FIELD, the begin index and end index of fieldPosition will be set to 0 and 1, respectively for the output string 1M. Similarly, positions of the prefix and the suffix fields can be obtained using NumberFormat.Field#PREFIX and NumberFormat.Field#SUFFIX respectively.
fieldPosition
)

Implements abstract java.text.NumberFormat.format.

Formats a double to produce a string representing its compact form.

pack-priv Format.StringBuf
format(double number, Format.StringBuf result, FieldPosition fieldPosition)

Overrides java.text.NumberFormat.format.

private Format.StringBuf
format(double number, Format.StringBuf result, Format.FieldDelegate delegate)

public StringBuffer

Returns:

the StringBuffer passed in as result
format
(long
the long number to format
number
,
StringBuffer
where the text is to be appended
result
,
FieldPosition
keeps track on the position of the field within the returned string. For example, to format a number 123456789 in the US locale, if the given fieldPosition is NumberFormat#INTEGER_FIELD, the begin index and end index of fieldPosition will be set to 0 and 3, respectively for the output string 123M. Similarly, positions of the prefix and the suffix fields can be obtained using NumberFormat.Field#PREFIX and NumberFormat.Field#SUFFIX respectively.
fieldPosition
)

Implements abstract java.text.NumberFormat.format.

Formats a long to produce a string representing its compact form.

pack-priv Format.StringBuf
format(long number, Format.StringBuf result, FieldPosition fieldPosition)

Overrides java.text.NumberFormat.format.

private Format.StringBuf
format(long number, Format.StringBuf result, Format.FieldDelegate delegate)

private Format.StringBuf

Returns:

the StringBuf passed in as result
format
(BigDecimal
the BigDecimal number to format
number
,
Format.StringBuf
where the text is to be appended
result
,
FieldPosition
keeps track on the position of the field within the returned string. For example, to format a number 1234567.89 in the US locale, if the given fieldPosition is NumberFormat#INTEGER_FIELD, the begin index and end index of fieldPosition will be set to 0 and 1, respectively for the output string 1M. Similarly, positions of the prefix and the suffix fields can be obtained using NumberFormat.Field#PREFIX and NumberFormat.Field#SUFFIX respectively.
fieldPosition
)

Formats a BigDecimal to produce a string representing its compact form.

private Format.StringBuf
private Format.StringBuf

Returns:

the StringBuf passed in as result
format
(BigInteger
the BigInteger number to format
number
,
Format.StringBuf
where the text is to be appended
result
,
FieldPosition
keeps track on the position of the field within the returned string. For example, to format a number 123456789 in the US locale, if the given fieldPosition is NumberFormat#INTEGER_FIELD, the begin index and end index of fieldPosition will be set to 0 and 3, respectively for the output string 123M. Similarly, positions of the prefix and the suffix fields can be obtained using NumberFormat.Field#PREFIX and NumberFormat.Field#SUFFIX respectively.
fieldPosition
)

Formats a BigInteger to produce a string representing its compact form.

private Format.StringBuf
format(BigInteger number, Format.StringBuf result, Format.FieldDelegate delegate, boolean formatLong)

public AttributedCharacterIterator

Returns:

an AttributedCharacterIterator describing the formatted value
formatToCharacterIterator
(Object
The object to format
obj
)

Overrides java.text.Format.formatToCharacterIterator.

Formats an Object producing an AttributedCharacterIterator.

private Number

Returns:

parsed result
generateParseResult
(Number
parsed number component
number
,
boolean
whether the parsed number contains decimal
gotDouble
,
boolean
whether the parsed number is Long.MIN
gotLongMin
,
boolean[]
boolean status flags indicating whether the value is infinite and whether it is positive
status
,
Number
compact number multiplier
cnfMultiplier
)

Returns the parsed result by multiplying the parsed number with the multiplier representing the prefix and suffix.

private String
getAffix(boolean isExpanded, boolean isPrefix, boolean isNegative, int compactDataIndex, double val)

Obtain the designated affix from the appropriate list of affixes, based on the given arguments.

private List<FieldPosition>

Returns:

a list of FieldPosition
getFieldPositions
(String
the pattern to be parsed for FieldPosition
pattern
,
NumberFormat.Field
whether a PREFIX or SUFFIX field
field
)

Returns a list of FieldPosition in the given pattern.

public int

Returns:

the grouping size
getGroupingSize
()

Returns the grouping size.

private double
getNumberValue(double number, double divisor)

private String

Returns:

LDML "count" tag
getPluralCategory
(double
input number in double type
input
)

Returns LDML's tag from the plurals rules

public RoundingMode

Returns:

the RoundingMode used for this CompactNumberFormat
getRoundingMode
()

Overrides java.text.NumberFormat.getRoundingMode.

Gets the java.math.RoundingMode used in this CompactNumberFormat.

public int

Returns:

the hash code for this CompactNumberFormat
hashCode
()

Overrides java.text.NumberFormat.hashCode.

Returns the hash code for this CompactNumberFormat.

public boolean

Returns:

true if grouping is used; false otherwise
isGroupingUsed
()

Overrides java.text.NumberFormat.isGroupingUsed.

Returns true if grouping is used in this format.

public boolean

Returns:

true if the parse method returns BigDecimal; false otherwise
isParseBigDecimal
()

Returns whether the parse(String, ParsePosition) method returns BigDecimal.

public boolean

Returns:

true if compact numbers should be parsed as integers only; false otherwise
isParseIntegerOnly
()

Overrides java.text.NumberFormat.isParseIntegerOnly.

Returns true if this format parses only an integer from the number component of a compact number.

public boolean
isStrict()

Overrides java.text.NumberFormat.isStrict.

Returns true if this format will parse numbers strictly; false otherwise.

private boolean
matchAffix(String text, int position, String affix, String defaultAffix, String matchedAffix)

Attempts to match the given affix in the specified text.

private static boolean
matchPluralRule(String condition, double input)

private boolean
matchPrefixAndSuffix(String text, int position, String prefix, String matchedPrefix, String defaultPrefix, String suffix, String matchedSuffix, String defaultSuffix)

Attempts to match given prefix and suffix in the specified text.

public Number

Returns:

the parsed value, or null if the parse fails
parse
(String
the string to be parsed
text
,
ParsePosition
a ParsePosition object with index and error index information as described above
pos
)

Implements abstract java.text.NumberFormat.parse.

Parses text from the beginning of the given string to produce a Number.

private double

Returns:

the number
parseNumberPart
(String
input text to be parsed
text
,
int
starting position
position
)

Parse the number part in the input text into a number

private void
private void
readObject(ObjectInputStream
the stream
inStream
)

Hides java.text.NumberFormat.readObject.

Reconstitutes this CompactNumberFormat from a stream (that is, deserializes it) after performing some validations.

private static boolean

Returns:

boolean to indicate whether the relation satisfies or not. If the relation is '=', true if any of the possible value/range satisfies. If the relation is '!=', none of the possible value/range should satisfy to return true.
relationCheck
(String
relation string, e.g, "n = 1, 3..5", or "n != 1, 3..5"
relation
,
double
value to examine in double
input
)

Checks if the input value satisfies the relation.

private int

Returns:

index of matched compact pattern; -1 if no compact patterns specified
selectCompactPattern
(long
number to be formatted
number
)

Select the index of the matched compact number pattern for the given long number.

private int

Returns:

index of matched compact pattern; -1 if no compact patterns specified
selectCompactPattern
(BigInteger
number to be formatted
number
)

Select the index of the matched compact number pattern for the given BigInteger number.

public void
setGroupingSize(int
the new grouping size
newValue
)

Sets the grouping size.

public void
setGroupingUsed(boolean
true if grouping is used; false otherwise
newValue
)

Overrides java.text.NumberFormat.setGroupingUsed.

Sets whether or not grouping will be used in this format.

public void
setMaximumFractionDigits(int
the maximum number of fraction digits to be shown.
newValue
)

Overrides java.text.NumberFormat.setMaximumFractionDigits.

Sets the maximum number of digits allowed in the fraction portion of a number during formatting.

public void
setMaximumIntegerDigits(int
the maximum number of integer digits to be shown.
newValue
)

Overrides java.text.NumberFormat.setMaximumIntegerDigits.

Sets the maximum number of digits allowed in the integer portion of a number during formatting.

public void
setMinimumFractionDigits(int
the minimum number of fraction digits to be shown.
newValue
)

Overrides java.text.NumberFormat.setMinimumFractionDigits.

Sets the minimum number of digits allowed in the fraction portion of a number during formatting.

public void
setMinimumIntegerDigits(int
the minimum number of integer digits to be shown.
newValue
)

Overrides java.text.NumberFormat.setMinimumIntegerDigits.

Sets the minimum number of digits allowed in the integer portion of a number during formatting.

public void
setParseBigDecimal(boolean
true if the parse method returns BigDecimal; false otherwise
newValue
)

Sets whether the parse(String, ParsePosition) method returns BigDecimal.

public void
setParseIntegerOnly(boolean
true if compact numbers should be parsed as integers only; false otherwise
value
)

Overrides java.text.NumberFormat.setParseIntegerOnly.

Sets whether or not this format parses only an integer from the number component of a compact number.

public void
setRoundingMode(RoundingMode
the RoundingMode to be used
roundingMode
)

Overrides java.text.NumberFormat.setRoundingMode.

Sets the java.math.RoundingMode used in this CompactNumberFormat.

public void
setStrict(boolean strict)

Overrides java.text.NumberFormat.setStrict.

Change the leniency value for parsing.

public String

Returns:

a string identifying this CompactNumberFormat, for debugging
toString
()

Overrides java.lang.Object.toString.

Returns a string identifying this CompactNumberFormat, for debugging.

private String

Returns:

the input rule (trimmed)
validateRule
(String
rule to validate
rule
)

Validates a plural rule.

private static boolean

Returns:

match indicator
valOrRangeMatches
(String
A string representing either a single value or a range
valueOrRange
,
double
to examine in double
input
)

Checks if the 'input' equals the value, or within the range.

Inherited from java.text.NumberFormat:
fastFormatformatformatgetAvailableLocalesgetCompactNumberInstancegetCompactNumberInstancegetCurrencygetCurrencyInstancegetCurrencyInstancegetInstancegetInstancegetIntegerInstancegetIntegerInstancegetMaximumFractionDigitsgetMaximumIntegerDigitsgetMinimumFractionDigitsgetMinimumIntegerDigitsgetNumberInstancegetNumberInstancegetPercentInstancegetPercentInstancegetScientificInstancegetScientificInstancematchToStyleparseparseObjectsetCurrency