|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.icu.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.
This is an enhanced version of DecimalFormatSymbols
that
is based on the standard version in the JDK. New or changed functionality
is labeled
NEW.
Locale
,
DecimalFormat
,
Serialized FormConstructor Summary | |
DecimalFormatSymbols()
Create a DecimalFormatSymbols object for the default locale. |
|
DecimalFormatSymbols(Locale locale)
Create a DecimalFormatSymbols object for the given locale. |
|
DecimalFormatSymbols(ULocale locale)
Deprecated. This is a draft API and might change in a future release of ICU. |
Method Summary | |
Object |
clone()
Standard override. |
boolean |
equals(Object obj)
Override equals. |
String |
getCurrencySymbol()
Return the string denoting the local currency. |
char |
getDecimalSeparator()
Return the character used for decimal sign. |
char |
getDigit()
Return the character used for a digit in a pattern. |
String |
getExponentSeparator()
NEW Return the string used to separate the mantissa from the exponent. |
char |
getGroupingSeparator()
Return the character used for thousands separator. |
String |
getInfinity()
Return the String used to represent infinity. |
String |
getInternationalCurrencySymbol()
Return the international string denoting the local currency. |
Locale |
getLocale()
Returns the locale for which this object was constructed. |
ULocale |
getLocale(ULocale.Type type)
Deprecated. This is a draft API and might change in a future release of ICU. |
char |
getMinusSign()
Return the character used to represent minus sign. |
char |
getMonetaryDecimalSeparator()
Return the monetary decimal separator. |
String |
getNaN()
Return the String used to represent NaN. |
char |
getPadEscape()
NEW Return the character used to pad numbers out to a specified width. |
char |
getPatternSeparator()
Return the character used to separate positive and negative subpatterns in a pattern. |
char |
getPercent()
Return the character used for percent sign. |
char |
getPerMill()
Return the character used for mille percent sign. |
char |
getPlusSign()
NEW Return the localized plus sign. |
char |
getSignificantDigit()
Deprecated. This is a draft API and might change in a future release of ICU. |
ULocale |
getULocale()
Deprecated. This is a draft API and might change in a future release of ICU. |
char |
getZeroDigit()
Return the character used for zero. |
int |
hashCode()
Override hashCode |
void |
setCurrencySymbol(String currency)
Set the string denoting the local currency. |
void |
setDecimalSeparator(char decimalSeparator)
Set the character used for decimal sign. |
void |
setDigit(char digit)
Set the character used for a digit in a pattern. |
void |
setExponentSeparator(String exp)
NEW Set the string used to separate the mantissa from the exponent. |
void |
setGroupingSeparator(char groupingSeparator)
Set the character used for thousands separator. |
void |
setInfinity(String infinity)
Set the String used to represent infinity. |
void |
setInternationalCurrencySymbol(String currency)
Set the international string denoting the local currency. |
void |
setMinusSign(char minusSign)
Set the character used to represent minus sign. |
void |
setMonetaryDecimalSeparator(char sep)
Set the monetary decimal separator. |
void |
setNaN(String NaN)
Set the String used to represent NaN. |
void |
setPadEscape(char c)
NEW Set the character used to pad numbers out to a specified width. |
void |
setPatternSeparator(char patternSeparator)
Set the character used to separate positive and negative subpatterns in a pattern. |
void |
setPercent(char percent)
Set the character used for percent sign. |
void |
setPerMill(char perMill)
Set the character used for mille percent sign. |
void |
setPlusSign(char plus)
NEW Set the localized plus sign. |
void |
setSignificantDigit(char sigDigit)
Deprecated. This is a draft API and might change in a future release of ICU. |
void |
setZeroDigit(char zeroDigit)
Set the character used for zero. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DecimalFormatSymbols()
public DecimalFormatSymbols(Locale locale)
locale
- the localepublic DecimalFormatSymbols(ULocale locale)
locale
- the localeMethod Detail |
public char getZeroDigit()
public void setZeroDigit(char zeroDigit)
zeroDigit
- the zero character.public char getSignificantDigit()
public void setSignificantDigit(char sigDigit)
sigDigit
- the significant digit pattern characterpublic char getGroupingSeparator()
public void setGroupingSeparator(char groupingSeparator)
groupingSeparator
- the thousands characterpublic char getDecimalSeparator()
public void setDecimalSeparator(char decimalSeparator)
decimalSeparator
- the decimal characterpublic char getPerMill()
public void setPerMill(char perMill)
perMill
- the mille percent characterpublic char getPercent()
public void setPercent(char percent)
percent
- the percent characterpublic char getDigit()
public void setDigit(char digit)
digit
- the digit pattern characterpublic char getPatternSeparator()
public void setPatternSeparator(char patternSeparator)
patternSeparator
- the pattern separator characterpublic String getInfinity()
public void setInfinity(String infinity)
infinity
- the Infinity Stringpublic String getNaN()
public void setNaN(String NaN)
NaN
- the NaN Stringpublic char getMinusSign()
public void setMinusSign(char minusSign)
minusSign
- the minus sign characterpublic String getCurrencySymbol()
public void setCurrencySymbol(String currency)
currency
- the local currency String.public String getInternationalCurrencySymbol()
public void setInternationalCurrencySymbol(String currency)
currency
- the international string denoting the local currency.public char getMonetaryDecimalSeparator()
public void setMonetaryDecimalSeparator(char sep)
sep
- the monetary decimal separator characterpublic String getExponentSeparator()
setExponentSeparator(java.lang.String)
public void setExponentSeparator(String exp)
exp
- the localized exponent symbol, used in localized patterns
and formatted stringsgetExponentSeparator()
public char getPlusSign()
setPlusSign(char)
,
setMinusSign(char)
,
getMinusSign()
public void setPlusSign(char plus)
plus
- the plus sign, used in localized patterns and formatted
stringsgetPlusSign()
,
setMinusSign(char)
,
getMinusSign()
public char getPadEscape()
setPadEscape(char)
,
DecimalFormat.getFormatWidth()
,
DecimalFormat.getPadPosition()
,
DecimalFormat.getPadCharacter()
public void setPadEscape(char c)
getPadEscape()
,
DecimalFormat.setFormatWidth(int)
,
DecimalFormat.setPadPosition(int)
,
DecimalFormat.setPadCharacter(char)
public Locale getLocale()
public ULocale getULocale()
public Object clone()
public boolean equals(Object obj)
public int hashCode()
public final ULocale getLocale(ULocale.Type type)
Note: This method will be implemented in ICU 3.0; ICU 2.8 contains a partial preview implementation. The * actual locale is returned correctly, but the valid locale is not, in most cases.
type
- type of information requested, either ULocale.VALID_LOCALE
or ULocale.ACTUAL_LOCALE
.
ULocale
,
ULocale.VALID_LOCALE
,
ULocale.ACTUAL_LOCALE
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |