java.lang.Object | |
↳ | java.text.DecimalFormatSymbols |
Encapsulates the set of symbols (such as the decimal separator, the grouping
separator, and so on) needed by DecimalFormat
to format numbers.
DecimalFormat
internally creates 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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new
DecimalFormatSymbols containing the symbols for
the default locale. | |||||||||||
Constructs a new DecimalFormatSymbols containing the symbols for the
specified Locale.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a new
DecimalFormatSymbols with the same symbols as this
DecimalFormatSymbols . | |||||||||||
Compares the specified object to this
DecimalFormatSymbols and
indicates if they are equal. | |||||||||||
Returns the currency.
| |||||||||||
Returns the currency symbol.
| |||||||||||
Returns the character which represents the decimal point in a number.
| |||||||||||
Returns the character which represents a single digit in a format
pattern.
| |||||||||||
Returns the character used as the thousands separator in a number.
| |||||||||||
Returns the string which represents infinity.
| |||||||||||
Returns the international currency symbol.
| |||||||||||
Returns the minus sign character.
| |||||||||||
Returns the character which represents the decimal point in a monetary
value.
| |||||||||||
Returns the string which represents NaN.
| |||||||||||
Returns the character which separates the positive and negative patterns
in a format pattern.
| |||||||||||
Returns the per mill sign character.
| |||||||||||
Returns the percent character.
| |||||||||||
Returns the character which represents zero.
| |||||||||||
Returns an integer hash code for this object.
| |||||||||||
Sets the currency.
| |||||||||||
Sets the currency symbol.
| |||||||||||
Sets the character which represents the decimal point in a number.
| |||||||||||
Sets the character which represents a single digit in a format pattern.
| |||||||||||
Sets the character used as the thousands separator in a number.
| |||||||||||
Sets the string which represents infinity.
| |||||||||||
Sets the international currency symbol.
| |||||||||||
Sets the minus sign character.
| |||||||||||
Sets the character which represents the decimal point in a monetary
value.
| |||||||||||
Sets the string which represents NaN.
| |||||||||||
Sets the character which separates the positive and negative patterns in
a format pattern.
| |||||||||||
Sets the per mill sign character.
| |||||||||||
Sets the percent character.
| |||||||||||
Sets the character which represents zero.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
|
Constructs a new DecimalFormatSymbols
containing the symbols for
the default locale. Best practice is to create a DecimalFormat
and then to get the DecimalFormatSymbols
from that object by
calling getDecimalFormatSymbols()
.
Constructs a new DecimalFormatSymbols containing the symbols for the
specified Locale. Best practice is to create a DecimalFormat
and then to get the DecimalFormatSymbols
from that object by
calling getDecimalFormatSymbols()
.
locale | the locale. |
---|
Returns a new DecimalFormatSymbols
with the same symbols as this
DecimalFormatSymbols
.
DecimalFormatSymbols
.Compares the specified object to this DecimalFormatSymbols
and
indicates if they are equal. In order to be equal, object
must be
an instance of DecimalFormatSymbols
and contain the same symbols.
object | the object to compare with this object. |
---|
true
if the specified object is equal to this
DecimalFormatSymbols
; false
otherwise.Returns the currency.
null
is returned if setInternationalCurrencySymbol()
has
been previously called with a value that is not a valid ISO 4217 currency
code.
setCurrency()
or setInternationalCurrencySymbol()
,
or null
if an invalid currency was set.Returns the currency symbol.
Returns the character which represents the decimal point in a number.
Returns the character which represents a single digit in a format pattern.
Returns the character used as the thousands separator in a number.
Returns the string which represents infinity.
Returns the international currency symbol.
Returns the minus sign character.
Returns the character which represents the decimal point in a monetary value.
Returns the string which represents NaN.
Returns the character which separates the positive and negative patterns in a format pattern.
Returns the per mill sign character.
Returns the percent character.
Returns the character which represents zero.
Returns an integer hash code for this object. By contract, any two
objects for which equals(Object)
returns true
must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Sets the currency.
The international currency symbol and the currency symbol are updated, but the min and max number of fraction digits stays the same.
currency | the new currency. |
---|
NullPointerException | if currency is null .
|
---|
Sets the currency symbol.
value | the currency symbol. |
---|
Sets the character which represents the decimal point in a number.
value | the decimal separator character. |
---|
Sets the character which represents a single digit in a format pattern.
value | the digit character. |
---|
Sets the character used as the thousands separator in a number.
value | the grouping separator character. |
---|
Sets the string which represents infinity.
value | the string representing infinity. |
---|
Sets the international currency symbol.
The currency and currency symbol are also updated if value
is a
valid ISO4217 currency code.
The min and max number of fraction digits stay the same.
value | the currency code. |
---|
Sets the minus sign character.
value | the minus sign character. |
---|
Sets the character which represents the decimal point in a monetary value.
value | the monetary decimal separator character. |
---|
Sets the string which represents NaN.
value | the string representing NaN. |
---|
Sets the character which separates the positive and negative patterns in a format pattern.
value | the pattern separator character. |
---|
Sets the per mill sign character.
value | the per mill character. |
---|
Sets the percent character.
value | the percent character. |
---|
Sets the character which represents zero.
value | the zero digit character. |
---|