|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.icu.text.DecimalFormatSymbols
public class 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)
Create a DecimalFormatSymbols object for the given locale. |
Method Summary | |
---|---|
Object |
clone()
Standard override. |
boolean |
equals(Object obj)
Override equals. |
static Locale[] |
getAvailableLocales()
Returns an array of all locales for which the getInstance methods of this
class can return localized instances. |
static ULocale[] |
getAvailableULocales()
Returns an array of all locales for which the getInstance methods of this
class can return localized instances. |
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. |
static DecimalFormatSymbols |
getInstance()
Gets a DecimalFormatSymbols instance for the default locale. |
static DecimalFormatSymbols |
getInstance(Locale locale)
Gets a DecimalFormatSymbols instance for the given locale. |
static DecimalFormatSymbols |
getInstance(ULocale locale)
Gets a DecimalFormatSymbols instance for the given locale. |
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. |
char |
getMonetaryGroupingSeparator()
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 |
setMonetaryGroupingSeparator(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. |
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 static DecimalFormatSymbols getInstance()
java.text.DecimalFormatSymbols#getInstance
,
this method simply returns new com.ibm.icu.text.DecimalFormatSymbols()
.
ICU does not support DecimalFormatSymbolsProvider
introduced in Java 6
or its equivalent implementation for now.
public static DecimalFormatSymbols getInstance(Locale locale)
java.text.DecimalFormatSymbols#getInstance
,
this method simply returns new com.ibm.icu.text.DecimalFormatSymbols(locale)
.
ICU does not support DecimalFormatSymbolsProvider
introduced in Java 6
or its equivalent implementation for now.
locale
- the locale.
public static DecimalFormatSymbols getInstance(ULocale locale)
java.text.DecimalFormatSymbols#getInstance
,
this method simply returns new com.ibm.icu.text.DecimalFormatSymbols(locale)
.
ICU does not support DecimalFormatSymbolsProvider
introduced in Java 6
or its equivalent implementation for now.
locale
- the locale.
public static Locale[] getAvailableLocales()
getInstance
methods of this
class can return localized instances.
java.text.DecimalFormatSymbols#getAvailableLocales
,
this method simply returns the array of Locale
s available for this class.
ICU does not support DecimalFormatSymbolsProvider
introduced in Java 6
or its equivalent implementation for now.
Locale
s for which localized DecimalFormatSymbols
instances are available.public static ULocale[] getAvailableULocales()
getInstance
methods of this
class can return localized instances.
java.text.DecimalFormatSymbols#getAvailableLocales
,
this method simply returns the array of ULocale
s available in this class.
ICU does not support DecimalFormatSymbolsProvider
introduced in Java 6
or its equivalent implementation for now.
ULocale
s for which localized DecimalFormatSymbols
instances are available.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 Currency getCurrency()
public void setCurrency(Currency currency)
currency
- the new currency to be used
NullPointerException
- if currency
is nullsetCurrencySymbol(java.lang.String)
,
setInternationalCurrencySymbol(java.lang.String)
public char getMonetaryDecimalSeparator()
public char getMonetaryGroupingSeparator()
public void setMonetaryDecimalSeparator(char sep)
sep
- the monetary decimal separator characterpublic void setMonetaryGroupingSeparator(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()
clone
in class Object
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
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 |