java.lang.Object | |
↳ | java.text.DecimalFormatSymbols |
This class represents the set of symbols (such as the decimal separator,
the grouping separator, and so on) needed by DecimalFormat
to format numbers. DecimalFormat
creates for itself an instance of
DecimalFormatSymbols
from its locale data. If you need to change any
of these symbols, you can get the DecimalFormatSymbols
object from
your DecimalFormat
and modify it.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a DecimalFormatSymbols object for the default locale.
| |||||||||||
Create a DecimalFormatSymbols object for the given locale.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Standard override.
| |||||||||||
Override equals.
| |||||||||||
Returns an array of all locales for which the
getInstance methods of this class can return
localized instances. | |||||||||||
Gets the currency of these DecimalFormatSymbols.
| |||||||||||
Returns the currency symbol for the currency of these
DecimalFormatSymbols in their locale.
| |||||||||||
Gets the character used for decimal sign.
| |||||||||||
Gets the character used for a digit in a pattern.
| |||||||||||
Returns the string used to separate the mantissa from the exponent.
| |||||||||||
Gets the character used for thousands separator.
| |||||||||||
Gets the string used to represent infinity.
| |||||||||||
Gets the
DecimalFormatSymbols instance for the specified
locale. | |||||||||||
Gets the
DecimalFormatSymbols instance for the default
locale. | |||||||||||
Returns the ISO 4217 currency code of the currency of these
DecimalFormatSymbols.
| |||||||||||
Gets the character used to represent minus sign.
| |||||||||||
Returns the monetary decimal separator.
| |||||||||||
Gets the string used to represent "not a number".
| |||||||||||
Gets the character used to separate positive and negative subpatterns
in a pattern.
| |||||||||||
Gets the character used for per mille sign.
| |||||||||||
Gets the character used for percent sign.
| |||||||||||
Gets the character used for zero.
| |||||||||||
Override hashCode.
| |||||||||||
Sets the currency of these DecimalFormatSymbols.
| |||||||||||
Sets the currency symbol for the currency of these
DecimalFormatSymbols in their locale.
| |||||||||||
Sets the character used for decimal sign.
| |||||||||||
Sets the character used for a digit in a pattern.
| |||||||||||
Sets the string used to separate the mantissa from the exponent.
| |||||||||||
Sets the character used for thousands separator.
| |||||||||||
Sets the string used to represent infinity.
| |||||||||||
Sets the ISO 4217 currency code of the currency of these
DecimalFormatSymbols.
| |||||||||||
Sets the character used to represent minus sign.
| |||||||||||
Sets the monetary decimal separator.
| |||||||||||
Sets the string used to represent "not a number".
| |||||||||||
Sets the character used to separate positive and negative subpatterns
in a pattern.
| |||||||||||
Sets the character used for per mille sign.
| |||||||||||
Sets the character used for percent sign.
| |||||||||||
Sets the character used for zero.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Create a DecimalFormatSymbols object for the default locale.
This constructor can only construct instances for the locales
supported by the Java runtime environment, not for those
supported by installed
DecimalFormatSymbolsProvider
implementations. For full locale coverage, use the
getInstance
method.
Create a DecimalFormatSymbols object for the given locale.
This constructor can only construct instances for the locales
supported by the Java runtime environment, not for those
supported by installed
DecimalFormatSymbolsProvider
implementations. For full locale coverage, use the
getInstance
method.
NullPointerException | if locale is null
|
---|
Override equals.
obj | the reference object with which to compare. |
---|
true
if this object is the same as the obj
argument; false
otherwise.Returns an array of all locales for which the
getInstance
methods of this class can return
localized instances.
The returned array represents the union of locales supported by the Java
runtime and by installed
DecimalFormatSymbolsProvider
implementations. It must contain at least a Locale
instance equal to Locale.US
.
DecimalFormatSymbols
instances are available.Gets the currency of these DecimalFormatSymbols. May be null if the currency symbol attribute was previously set to a value that's not a valid ISO 4217 currency code.
Returns the currency symbol for the currency of these DecimalFormatSymbols in their locale.
Gets the character used for decimal sign. Different for French, etc.
Gets the character used for a digit in a pattern.
Returns the string used to separate the mantissa from the exponent. Examples: "x10^" for 1.23x10^4, "E" for 1.23E4.
Gets the character used for thousands separator. Different for French, etc.
Gets the string used to represent infinity. Almost always left unchanged.
Gets the DecimalFormatSymbols
instance for the specified
locale. This method provides access to DecimalFormatSymbols
instances for locales supported by the Java runtime itself as well
as for those supported by installed
DecimalFormatSymbolsProvider
implementations.
locale | the desired locale. |
---|
DecimalFormatSymbols
instance.NullPointerException | if locale is null |
---|
Gets the DecimalFormatSymbols
instance for the default
locale. This method provides access to DecimalFormatSymbols
instances for locales supported by the Java runtime itself as well
as for those supported by installed
DecimalFormatSymbolsProvider
implementations.
DecimalFormatSymbols
instance.Returns the ISO 4217 currency code of the currency of these DecimalFormatSymbols.
Gets the character used to represent minus sign. If no explicit negative format is specified, one is formed by prefixing minusSign to the positive format.
Returns the monetary decimal separator.
Gets the string used to represent "not a number". Almost always left unchanged.
Gets the character used to separate positive and negative subpatterns in a pattern.
Gets the character used for per mille sign. Different for Arabic, etc.
Gets the character used for percent sign. Different for Arabic, etc.
Gets the character used for zero. Different for Arabic, etc.
Override hashCode.
Sets the currency of these DecimalFormatSymbols. This also sets the currency symbol attribute to the currency's symbol in the DecimalFormatSymbols' locale, and the international currency symbol attribute to the currency's ISO 4217 currency code.
currency | the new currency to be used |
---|
NullPointerException | if currency is null |
---|
Sets the currency symbol for the currency of these DecimalFormatSymbols in their locale.
Sets the character used for decimal sign. Different for French, etc.
Sets the character used for a digit in a pattern.
Sets the string used to separate the mantissa from the exponent. Examples: "x10^" for 1.23x10^4, "E" for 1.23E4.
exp | the exponent separator string |
---|
NullPointerException | if exp is null |
---|
Sets the character used for thousands separator. Different for French, etc.
Sets the string used to represent infinity. Almost always left unchanged.
Sets the ISO 4217 currency code of the currency of these
DecimalFormatSymbols.
If the currency code is valid (as defined by
Currency.getInstance
),
this also sets the currency attribute to the corresponding Currency
instance and the currency symbol attribute to the currency's symbol
in the DecimalFormatSymbols' locale. If the currency code is not valid,
then the currency attribute is set to null and the currency symbol
attribute is not modified.
Sets the character used to represent minus sign. If no explicit negative format is specified, one is formed by prefixing minusSign to the positive format.
Sets the monetary decimal separator.
Sets the string used to represent "not a number". Almost always left unchanged.
Sets the character used to separate positive and negative subpatterns in a pattern.
Sets the character used for per mille sign. Different for Arabic, etc.
Sets the character used for percent sign. Different for Arabic, etc.
Sets the character used for zero. Different for Arabic, etc.