public final class DecimalFormatSymbols extends Object implements Cloneable
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.Locale
,
DecimalFormat
Constructor and Description |
---|
DecimalFormatSymbols()
Create a DecimalFormatSymbols object for the default locale.
|
DecimalFormatSymbols(Locale locale)
Create a DecimalFormatSymbols object for the given locale.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Standard override.
|
boolean |
equals(Object obj)
Override equals
|
char |
getDecimalSeparator()
Get character used for decimal sign.
|
char |
getDigit()
Gets the character used for a digit in a pattern.
|
char |
getGroupingSeparator()
Get the character used for thousands separator.
|
String |
getInfinity()
Gets the character used to represent infinity.
|
char |
getMinusSign()
Gets the character used to represent minus sign.
|
String |
getNaN()
Gets character used to represent NaN.
|
char |
getPatternSeparator()
Gets the character used to separate positive and negative subpatterns in a pattern.
|
char |
getPercent()
Gets the character used for percent sign.
|
char |
getPerMill()
Get the character used for mille percent sign.
|
char |
getZeroDigit()
Gets character used for zero.
|
int |
hashCode()
Override hashCode
|
void |
setDecimalSeparator(char decimalSeparator)
Set character used for decimal sign.
|
void |
setDigit(char digit)
Sets the character used for a digit in a pattern.
|
void |
setGroupingSeparator(char groupingSeparator)
Set the character used for thousands separator.
|
void |
setInfinity(String infinity)
Sets the character used to represent infinity.
|
void |
setMinusSign(char minusSign)
Sets the character used to represent minus sign.
|
void |
setNaN(String NaN)
Sets character used to represent NaN.
|
void |
setPatternSeparator(char patternSeparator)
Sets the character used to separate positive and negative subpatterns in a pattern.
|
void |
setPercent(char percent)
Sets the character used for percent sign.
|
void |
setPerMill(char perMill)
Set the character used for mille percent sign.
|
void |
setZeroDigit(char zeroDigit)
Sets character used for zero.
|
public DecimalFormatSymbols()
public DecimalFormatSymbols(Locale locale)
locale
- localepublic char getZeroDigit()
public void setZeroDigit(char zeroDigit)
zeroDigit
- zero characterpublic char getGroupingSeparator()
public void setGroupingSeparator(char groupingSeparator)
groupingSeparator
- the character to usepublic char getDecimalSeparator()
public void setDecimalSeparator(char decimalSeparator)
decimalSeparator
- the character to usepublic char getPerMill()
public void setPerMill(char perMill)
perMill
- the character to usepublic char getPercent()
public void setPercent(char percent)
percent
- the character to usepublic char getDigit()
public void setDigit(char digit)
digit
- the character to usepublic char getPatternSeparator()
public void setPatternSeparator(char patternSeparator)
patternSeparator
- the character to usepublic String getInfinity()
public void setInfinity(String infinity)
infinity
- the character to usepublic String getNaN()
public void setNaN(String NaN)
NaN
- the character to usepublic char getMinusSign()
public void setMinusSign(char minusSign)
minusSign
- the character to usepublic Object clone()
public boolean equals(Object obj)
equals
in class Object
obj
- the reference object with which to compare.true
if this object is the same as the obj
argument; false
otherwise.Boolean.hashCode()
,
Hashtable
public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)
,
Hashtable