java.text
public
final
class
java.text.DecimalFormatSymbols
DecimalFormatSymbols holds the symbols used in the formating and parsing of
numbers.
Summary
Public Constructors
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
public
DecimalFormatSymbols()
Constructs a new DecimalFormatSymbols containing the symbols for the
default Locale.
public
DecimalFormatSymbols(Locale locale)
Constructs a new DecimalFormatSymbols containing the symbols for the
specified Locale.
Public Methods
public
Object
clone()
Returns a new DecimalFormatSymbols with the same symbols as this
DecimalFormatSymbols.
Returns
- a shallow copy of this DecimalFormatSymbols
public
boolean
equals(Object object)
Compares the specified object to this DecimalFormatSymbols and answer if
they are equal. The object must be an instance of DecimalFormatSymbols
with the same symbols.
Parameters
object
| the object to compare with this object |
Returns
- true if the specified object is equal to this
DecimalFormatSymbols, false otherwise
public
Currency
getCurrency()
Returns the currency.
null is returned
if setInternationalCurrencySymbol()
has been previously called
with a value that is not a valid ISO 4217 currency code.
Returns
- the currency that was set in the constructor,
setCurrency()
,
or setInternationalCurrencySymbol()
, or null
public
String
getCurrencySymbol()
Returns the currency symbol.
public
char
getDecimalSeparator()
Returns the character which represents the decimal point in a number.
public
char
getDigit()
Returns the character which represents a single digit in a format
pattern.
public
char
getGroupingSeparator()
Returns the character used as the thousands separator in a number.
public
String
getInfinity()
Returns the String which represents infinity.
public
String
getInternationalCurrencySymbol()
Returns the international currency symbol.
public
char
getMinusSign()
Returns the minus sign character.
public
char
getMonetaryDecimalSeparator()
Returns the character which represents the decimal point in a monetary
value.
public
String
getNaN()
Returns the String which represents NaN.
public
char
getPatternSeparator()
Returns the character which separates the positive and negative patterns
in a format pattern.
public
char
getPerMill()
Returns the mille percent sign character.
public
char
getPercent()
Returns the percent character.
public
char
getZeroDigit()
Returns the character which represents zero.
public
int
hashCode()
Returns an integer hash code for the receiver. Objects which are equal
answer the same value for this method.
public
void
setCurrency(Currency currency)
Sets the currency.
The international currency symbol and currency symbol are updated, but
the min and max number of fraction digits stay the same.
Parameters
currency
| the new currency |
public
void
setCurrencySymbol(String value)
Sets the currency symbol.
public
void
setDecimalSeparator(char value)
Sets the character which represents the decimal point in a number.
Parameters
value
| the decimal separator character
|
public
void
setDigit(char value)
Sets the character which represents a single digit in a format pattern.
Parameters
value
| the digit character
|
public
void
setGroupingSeparator(char value)
Sets the character used as the thousands separator in a number.
Parameters
value
| the grouping separator character
|
public
void
setInfinity(String value)
Sets the String which represents infinity.
public
void
setInternationalCurrencySymbol(String value)
Sets the international currency symbol.
currency and currency symbol also are updated, if value
is
a valid ISO4217 currency code.
The min and max number of fraction digits stay the same.
public
void
setMinusSign(char value)
Sets the minus sign character.
Parameters
value
| the minus sign character
|
public
void
setMonetaryDecimalSeparator(char value)
Sets the character which represents the decimal point in a monetary
value.
Parameters
value
| the monetary decimal separator character
|
public
void
setNaN(String value)
Sets the String which represents NaN.
public
void
setPatternSeparator(char value)
Sets the character which separates the positive and negative patterns in
a format pattern.
Parameters
value
| the pattern separator character
|
public
void
setPerMill(char value)
Sets the mille percent sign character.
Parameters
value
| the mille percent character
|
public
void
setPercent(char value)
Sets the percent character.
Parameters
value
| the percent character
|
public
void
setZeroDigit(char value)
Sets the character which represents zero.
Parameters
value
| the zero digit character
|