Java java.text DecimalFormat fields, constructors, methods, implement or subclass

Example usage for Java java.text DecimalFormat fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.text DecimalFormat.

The text is from its open source code.

Constructor

DecimalFormat(String pattern)
Creates a DecimalFormat using the given pattern and the symbols for the default java.util.Locale.Category#FORMAT FORMAT locale.
DecimalFormat()
Creates a DecimalFormat using the default pattern and symbols for the default java.util.Locale.Category#FORMAT FORMAT locale.
DecimalFormat(String pattern, DecimalFormatSymbols symbols)
Creates a DecimalFormat using the given pattern and symbols.

Method

voidapplyLocalizedPattern(String pattern)
Apply the given pattern to this Format object.
voidapplyPattern(String pattern)
Apply the given pattern to this Format object.
Objectclone()
Standard override; no change in semantics.
booleanequals(Object obj)
Overrides equals
Stringformat(double number)
Specialization of format.
CurrencygetCurrency()
Gets the currency used by this decimal format when formatting currency values.
NumberFormatgetCurrencyInstance(Locale inLocale)
Returns a currency format for the specified locale.
DecimalFormatSymbolsgetDecimalFormatSymbols()
Returns a copy of the decimal format symbols, which is generally not changed by the programmer or user.
intgetGroupingSize()
Return the grouping size.
NumberFormatgetInstance()
Returns a general-purpose number format for the current default java.util.Locale.Category#FORMAT FORMAT locale.
intgetMaximumFractionDigits()
Gets the maximum number of digits allowed in the fraction portion of a number.
intgetMaximumIntegerDigits()
Gets the maximum number of digits allowed in the integer portion of a number.
intgetMinimumFractionDigits()
Gets the minimum number of digits allowed in the fraction portion of a number.
intgetMinimumIntegerDigits()
Gets the minimum number of digits allowed in the integer portion of a number.
intgetMultiplier()
Gets the multiplier for use in percent, per mille, and similar formats.
StringgetNegativePrefix()
Get the negative prefix.
StringgetNegativeSuffix()
Get the negative suffix.
StringgetPositivePrefix()
Get the positive prefix.
StringgetPositiveSuffix()
Get the positive suffix.
RoundingModegetRoundingMode()
Gets the java.math.RoundingMode used in this DecimalFormat.
inthashCode()
Overrides hashCode
booleanisDecimalSeparatorAlwaysShown()
Allows you to get the behavior of the decimal separator with integers.
booleanisParseBigDecimal()
Returns whether the #parse(java.lang.String,java.text.ParsePosition) method returns BigDecimal .
Numberparse(String source)
Parses text from the beginning of the given string to produce a number.
Numberparse(String text, ParsePosition pos)
Parses text from a string to produce a Number .
ObjectparseObject(String source, ParsePosition pos)
Parses text from a string to produce a Number.
ObjectparseObject(String source)
Parses text from the beginning of the given string to produce an object.
voidsetCurrency(Currency currency)
Sets the currency used by this number format when formatting currency values.
voidsetDecimalFormatSymbols(DecimalFormatSymbols newSymbols)
Sets the decimal format symbols, which is generally not changed by the programmer or user.
voidsetDecimalSeparatorAlwaysShown(boolean newValue)
Allows you to set the behavior of the decimal separator with integers.
voidsetGroupingSize(int newValue)
Set the grouping size.
voidsetGroupingUsed(boolean newValue)
voidsetMaximumFractionDigits(int newValue)
Sets the maximum number of digits allowed in the fraction portion of a number.
voidsetMaximumIntegerDigits(int newValue)
Sets the maximum number of digits allowed in the integer portion of a number.
voidsetMinimumFractionDigits(int newValue)
Sets the minimum number of digits allowed in the fraction portion of a number.
voidsetMinimumIntegerDigits(int newValue)
Sets the minimum number of digits allowed in the integer portion of a number.
voidsetMultiplier(int newValue)
Sets the multiplier for use in percent, per mille, and similar formats.
voidsetNegativePrefix(String newValue)
Set the negative prefix.
voidsetNegativeSuffix(String newValue)
Set the negative suffix.
voidsetParseBigDecimal(boolean newValue)
Sets whether the #parse(java.lang.String,java.text.ParsePosition) method returns BigDecimal .
voidsetParseIntegerOnly(boolean value)
Sets whether or not numbers should be parsed as integers only.
voidsetPositivePrefix(String newValue)
Set the positive prefix.
voidsetPositiveSuffix(String newValue)
Set the positive suffix.
voidsetRoundingMode(RoundingMode roundingMode)
Sets the java.math.RoundingMode used in this DecimalFormat.
StringtoLocalizedPattern()
Synthesizes a localized pattern string that represents the current state of this Format object.
StringtoPattern()
Synthesizes a pattern string that represents the current state of this Format object.