void
|
applyLocalizedPattern(String localizedPattern)
Converts the given string to standard notation and then parses it using applyPattern(String) .
|
void
|
applyPattern(String pattern)
Parses the given pattern string and overwrites the settings specified in the pattern string.
|
boolean
|
areSignificantDigitsUsed()
[icu] Returns whether significant digits are being used in rounding.
|
Object
|
clone()
Overrides clone.
|
boolean
|
equals(Object obj)
Tests for equality between this formatter and another formatter.
|
StringBuffer
|
format(BigInteger number, StringBuffer result, FieldPosition fieldPosition)
[icu] Formats a BigInteger.
|
StringBuffer
|
format(CurrencyAmount currAmt, StringBuffer result, FieldPosition fieldPosition)
[icu] Formats a CurrencyAmount.
|
StringBuffer
|
format(BigDecimal number, StringBuffer result, FieldPosition fieldPosition)
[icu] Formats an ICU BigDecimal.
|
StringBuffer
|
format(double number, StringBuffer result, FieldPosition fieldPosition)
Specialization of format.
|
StringBuffer
|
format(BigDecimal number, StringBuffer result, FieldPosition fieldPosition)
[icu] Formats a BigDecimal.
|
StringBuffer
|
format(long number, StringBuffer result, FieldPosition fieldPosition)
Specialization of format.
|
AttributedCharacterIterator
|
formatToCharacterIterator(Object obj)
Formats an Object producing an AttributedCharacterIterator .
|
Currency
|
getCurrency()
Returns the currency used to display currency amounts.
|
CurrencyPluralInfo
|
getCurrencyPluralInfo()
[icu] Returns the current instance of CurrencyPluralInfo.
|
Currency.CurrencyUsage
|
getCurrencyUsage()
[icu] Returns the strategy for rounding currency amounts.
|
DecimalFormatSymbols
|
getDecimalFormatSymbols()
Returns a copy of the decimal format symbols used by this formatter.
|
int
|
getFormatWidth()
Returns the minimum number of characters in formatted output.
|
int
|
getGroupingSize()
Returns the primary grouping size in use.
|
MathContext
|
getMathContext()
[icu] Returns the MathContext being used to round numbers.
|
MathContext
|
getMathContextICU()
[icu] Returns the MathContext being used to round numbers.
|
int
|
getMaximumFractionDigits()
Returns the effective maximum number of integer digits after the decimal separator.
|
int
|
getMaximumIntegerDigits()
Returns the effective maximum number of digits before the decimal separator.
|
int
|
getMaximumSignificantDigits()
[icu] Returns the effective maximum number of significant digits displayed.
|
byte
|
getMinimumExponentDigits()
[icu] Returns the minimum number of digits printed in the exponent in scientific notation.
|
int
|
getMinimumFractionDigits()
Returns the effective minimum number of integer digits after the decimal separator.
|
int
|
getMinimumGroupingDigits()
[icu] Returns the minimum number of digits before grouping is triggered.
|
int
|
getMinimumIntegerDigits()
Returns the effective minimum number of digits before the decimal separator.
|
int
|
getMinimumSignificantDigits()
[icu] Returns the effective minimum number of significant digits displayed.
|
int
|
getMultiplier()
Returns the multiplier being applied to numbers before they are formatted.
|
String
|
getNegativePrefix()
Affixes: Gets the negative prefix string currently being used to format
numbers.
|
String
|
getNegativeSuffix()
Affixes: Gets the negative suffix string currently being used to format
numbers.
|
char
|
getPadCharacter()
[icu] Returns the character used for padding.
|
int
|
getPadPosition()
[icu] Returns the position used for padding.
|
int
|
getParseMaxDigits()
This method was deprecated
in API level 28.
Setting max parse digits has no effect since ICU4J 59.
|
String
|
getPositivePrefix()
Affixes: Gets the positive prefix string currently being used to format
numbers.
|
String
|
getPositiveSuffix()
Affixes: Gets the positive suffix string currently being used to format
numbers.
|
BigDecimal
|
getRoundingIncrement()
[icu] Returns the increment to which numbers are being rounded.
|
int
|
getRoundingMode()
Returns the rounding mode being used to round numbers.
|
int
|
getSecondaryGroupingSize()
[icu] Returns the secondary grouping size in use.
|
int
|
hashCode()
Returns a hash code value for the object.
|
boolean
|
isDecimalPatternMatchRequired()
[icu] Returns whether the presence of a decimal point must match the pattern.
|
boolean
|
isDecimalSeparatorAlwaysShown()
Returns whether the decimal separator is shown on integers.
|
boolean
|
isExponentSignAlwaysShown()
[icu] Returns whether the sign (plus or minus) is always printed in scientific notation.
|
boolean
|
isGroupingUsed()
Returns whether or not grouping separators are being printed in the output.
|
boolean
|
isParseBigDecimal()
Returns whether NumberFormat.parse(String) will always return a BigDecimal.
|
boolean
|
isParseCaseSensitive()
[icu] Returns whether to force case (uppercase/lowercase) to match when parsing.
|
boolean
|
isParseIntegerOnly()
Returns true if this format will parse numbers as integers only.
|
boolean
|
isParseNoExponent()
[icu] Returns whether to ignore exponents when parsing.
|
boolean
|
isParseStrict()
[icu] Returns whether strict parsing is in effect.
|
boolean
|
isScientificNotation()
[icu] Returns whether scientific (exponential) notation is enabled on this formatter.
|
boolean
|
isSignAlwaysShown()
[icu] Returns whether the sign is being shown on positive numbers.
|
Number
|
parse(String text, ParsePosition parsePosition)
Returns a Long if possible (e.g., within the range [Long.MIN_VALUE,
Long.MAX_VALUE] and with no decimals); otherwise, returns another type,
such as a BigDecimal, BigInteger, or Double.
|
CurrencyAmount
|
parseCurrency(CharSequence text, ParsePosition parsePosition)
Parses text from the given string as a CurrencyAmount.
|
void
|
setCurrency(Currency currency)
Sets the currency to be used when formatting numbers.
|
void
|
setCurrencyPluralInfo(CurrencyPluralInfo newInfo)
[icu] Sets a custom instance of CurrencyPluralInfo.
|
void
|
setCurrencyUsage(Currency.CurrencyUsage usage)
[icu] Sets the currency-dependent strategy to use when rounding numbers.
|
void
|
setDecimalFormatSymbols(DecimalFormatSymbols newSymbols)
Sets the decimal format symbols used by this formatter.
|
void
|
setDecimalPatternMatchRequired(boolean value)
[icu] Parsing: This method is used to either require or
forbid the presence of a decimal point in the string being parsed (disabled by
default).
|
void
|
setDecimalSeparatorAlwaysShown(boolean value)
Separators: Sets whether the decimal separator (a period in en-US) is
shown on integers.
|
void
|
setExponentSignAlwaysShown(boolean expSignAlways)
[icu] Scientific Notation: Sets whether the sign (plus or minus) is always to
be shown in the exponent in scientific notation.
|
void
|
setFormatWidth(int width)
Padding: Sets the minimum width of the string output by the formatting
pipeline.
|
void
|
setGroupingSize(int width)
Grouping: Sets the primary grouping size (distance between grouping
separators) used when formatting large numbers.
|
void
|
setGroupingUsed(boolean enabled)
Grouping: Sets whether grouping is to be used when formatting numbers.
|
void
|
setMathContext(MathContext mathContext)
[icu] Rounding and Digit Limits: Sets the MathContext used
to round numbers.
|
void
|
setMathContextICU(MathContext mathContextICU)
[icu] Rounding and Digit Limits: Overload of setMathContext(MathContext) for
MathContext .
|
void
|
setMaximumFractionDigits(int value)
Rounding and Digit Limits: Sets the maximum number of digits to display after
the decimal separator.
|
void
|
setMaximumIntegerDigits(int value)
Rounding and Digit Limits: Sets the maximum number of digits to display before
the decimal separator.
|
void
|
setMaximumSignificantDigits(int value)
[icu] Rounding and Digit Limits: Sets the maximum number of significant
digits to be displayed.
|
void
|
setMinimumExponentDigits(byte minExpDig)
[icu] Scientific Notation: Sets the minimum number of digits to be printed in
the exponent.
|
void
|
setMinimumFractionDigits(int value)
Rounding and Digit Limits: Sets the minimum number of digits to display after
the decimal separator.
|
void
|
setMinimumGroupingDigits(int number)
[icu] Sets the minimum number of digits that must be before the first grouping separator in
order for the grouping separator to be printed.
|
void
|
setMinimumIntegerDigits(int value)
Rounding and Digit Limits: Sets the minimum number of digits to display before
the decimal separator.
|
void
|
setMinimumSignificantDigits(int value)
[icu] Rounding and Digit Limits: Sets the minimum number of significant
digits to be displayed.
|
void
|
setMultiplier(int multiplier)
Sets a number that will be used to multiply all numbers prior to formatting.
|
void
|
setNegativePrefix(String prefix)
Affixes: Sets the string to prepend to negative numbers.
|
void
|
setNegativeSuffix(String suffix)
Affixes: Sets the string to append to negative numbers.
|
void
|
setPadCharacter(char padChar)
[icu] Padding: Sets the character used to pad numbers that are narrower than
the width specified in setFormatWidth(int) .
|
void
|
setPadPosition(int padPos)
[icu] Padding: Sets the position where to insert the pad character when
narrower than the width specified in setFormatWidth(int) .
|
void
|
setParseBigDecimal(boolean value)
Whether to make NumberFormat.parse(String) prefer returning a BigDecimal when
possible.
|
void
|
setParseCaseSensitive(boolean value)
[icu] Specifies whether parsing should require cases to match in affixes, exponent separators,
and currency codes.
|
void
|
setParseIntegerOnly(boolean parseIntegerOnly)
Parsing: Sets whether to ignore the fraction part of a number when parsing
(defaults to false).
This is functionally equivalent to calling setDecimalPatternMatchRequired(boolean) and a
pattern without a decimal point.
|
void
|
setParseMaxDigits(int maxDigits)
This method was deprecated
in API level 28.
Setting max parse digits has no effect since ICU4J 59.
|
void
|
setParseNoExponent(boolean value)
[icu] Specifies whether to stop parsing when an exponent separator is encountered.
|
void
|
setParseStrict(boolean parseStrict)
[icu] Sets whether strict parsing is in effect.
|
void
|
setPositivePrefix(String prefix)
Affixes: Sets the string to prepend to positive numbers.
|
void
|
setPositiveSuffix(String suffix)
Affixes: Sets the string to append to positive numbers.
|
void
|
setRoundingIncrement(BigDecimal increment)
[icu] Rounding and Digit Limits: Sets an increment, or interval, to which
numbers are rounded.
|
void
|
setRoundingIncrement(BigDecimal increment)
[icu] Rounding and Digit Limits: Overload of setRoundingIncrement(java.math.BigDecimal) .
|
void
|
setRoundingIncrement(double increment)
[icu] Rounding and Digit Limits: Overload of setRoundingIncrement(java.math.BigDecimal) .
|
void
|
setRoundingMode(int roundingMode)
Rounding and Digit Limits: Sets the RoundingMode used to round
numbers.
|
void
|
setScientificNotation(boolean useScientific)
[icu] Scientific Notation: Sets whether this formatter should print in
scientific (exponential) notation.
|
void
|
setSecondaryGroupingSize(int width)
[icu] Grouping: Sets the secondary grouping size (distance between grouping
separators after the first separator) used when formatting large numbers.
|
void
|
setSignAlwaysShown(boolean value)
Sets whether to always shown the plus sign ('+' in en) on positive numbers.
|
void
|
setSignificantDigitsUsed(boolean useSignificantDigits)
[icu] Rounding and Digit Limits: Sets whether significant digits are to be
used in rounding.
|
String
|
toLocalizedPattern()
Calls toPattern() and converts the string to localized notation.
|
String
|
toPattern()
Serializes this formatter object to a decimal format pattern string.
|
String
|
toString()
Returns the default value of toString() with extra DecimalFormat-specific information appended
to the end of the string.
|