com.ibm.icu.text
public final class DecimalFormatSymbols extends Object implements Cloneable, Serializable
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.
See Also: java.util.Locale DecimalFormat
UNKNOWN: ICU 2.0
Constructor Summary | |
---|---|
DecimalFormatSymbols()
Create a DecimalFormatSymbols object for the default locale. | |
DecimalFormatSymbols(Locale locale)
Create a DecimalFormatSymbols object for the given locale. | |
DecimalFormatSymbols(ULocale locale)
Create a DecimalFormatSymbols object for the given locale. |
Method Summary | |
---|---|
Object | clone()
Standard override. |
boolean | equals(Object obj)
Override equals. |
Currency | getCurrency()
Returns the currency symbol, for JDK 1.4 compatibility only.
|
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)
Return the locale that was used to create this object, or null.
|
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()
Return the character used to represent a significant digit in a pattern. |
ULocale | getULocale()
Returns the locale for which this object was constructed. |
char | getZeroDigit()
Return the character used for zero. |
int | hashCode()
Override hashCode |
void | setCurrency(Currency currency)
ICU does not use the DecimalFormatSymbols for the
currency any more. |
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)
Set the character used to represent a significant digit in a pattern. |
void | setZeroDigit(char zeroDigit)
Set the character used for zero. |
UNKNOWN: ICU 2.0
Parameters: locale the locale
UNKNOWN: ICU 2.0
Parameters: locale the locale
UNKNOWN: ICU 3.2 This API might change or be removed in a future release.
UNKNOWN: ICU 2.0
UNKNOWN: ICU 2.0
Returns: the currency used, or null
UNKNOWN: ICU 3.4 This API might change or be removed in a future release.
Returns: the local currency String.
UNKNOWN: ICU 2.0
Returns: the decimal character
UNKNOWN: ICU 2.0
Returns: the digit pattern character
UNKNOWN: ICU 2.0
Returns: the localized exponent symbol, used in localized patterns and formatted strings
See Also: DecimalFormatSymbols
UNKNOWN: ICU 2.0
Returns: the thousands character
UNKNOWN: ICU 2.0
Returns: the Infinity string
UNKNOWN: ICU 2.0
Returns: the international string denoting the local currency
UNKNOWN: ICU 2.0
Returns: the locale for which this object was constructed
UNKNOWN: ICU 2.0
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.
Parameters: type type of information requested, either {@link com.ibm.icu.util.ULocale#VALID_LOCALE} or {@link com.ibm.icu.util.ULocale#ACTUAL_LOCALE}.
Returns: the information specified by type, or null if this object was not constructed from locale data.
See Also: ULocale VALID_LOCALE ACTUAL_LOCALE
UNKNOWN: ICU 2.8 (retain) This API might change or be removed in a future release.
Returns: the minus sign character
UNKNOWN: ICU 2.0
Returns: the monetary decimal separator character
UNKNOWN: ICU 2.0
Returns: the NaN String
UNKNOWN: ICU 2.0
Returns: the character
See Also: DecimalFormatSymbols DecimalFormat DecimalFormat DecimalFormat
UNKNOWN: ICU 2.0
Returns: the pattern separator character
UNKNOWN: ICU 2.0
Returns: the percent character
UNKNOWN: ICU 2.0
Returns: the mille percent character
UNKNOWN: ICU 2.0
Returns: the plus sign, used in localized patterns and formatted strings
See Also: DecimalFormatSymbols DecimalFormatSymbols DecimalFormatSymbols
UNKNOWN: ICU 2.0
Returns: the significant digit pattern character
UNKNOWN: ICU 3.0 This API might change or be removed in a future release.
Returns: the locale for which this object was constructed
UNKNOWN: ICU 3.2 This API might change or be removed in a future release.
Returns: the character
UNKNOWN: ICU 2.0
UNKNOWN: ICU 2.0
Parameters: currency the new currency to be used
Throws: NullPointerException if currency
is null
See Also: DecimalFormatSymbols DecimalFormatSymbols
UNKNOWN: ICU 3.4 This API might change or be removed in a future release.
Parameters: currency the local currency String.
UNKNOWN: ICU 2.0
Parameters: decimalSeparator the decimal character
UNKNOWN: ICU 2.0
Parameters: digit the digit pattern character
UNKNOWN: ICU 2.0
Parameters: exp the localized exponent symbol, used in localized patterns and formatted strings
See Also: DecimalFormatSymbols
UNKNOWN: ICU 2.0
Parameters: groupingSeparator the thousands character
UNKNOWN: ICU 2.0
Parameters: infinity the Infinity String
UNKNOWN: ICU 2.0
Parameters: currency the international string denoting the local currency.
UNKNOWN: ICU 2.0
Parameters: minusSign the minus sign character
UNKNOWN: ICU 2.0
Parameters: sep the monetary decimal separator character
UNKNOWN: ICU 2.0
Parameters: NaN the NaN String
UNKNOWN: ICU 2.0
See Also: DecimalFormatSymbols DecimalFormat DecimalFormat DecimalFormat
UNKNOWN: ICU 2.0
Parameters: patternSeparator the pattern separator character
UNKNOWN: ICU 2.0
Parameters: percent the percent character
UNKNOWN: ICU 2.0
Parameters: perMill the mille percent character
UNKNOWN: ICU 2.0
Parameters: plus the plus sign, used in localized patterns and formatted strings
See Also: DecimalFormatSymbols DecimalFormatSymbols DecimalFormatSymbols
UNKNOWN: ICU 2.0
Parameters: sigDigit the significant digit pattern character
UNKNOWN: ICU 3.0 This API might change or be removed in a future release.
Parameters: zeroDigit the zero character.
UNKNOWN: ICU 2.0