Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.
public class DecimalFormatSymbols
- Object
- DecimalFormatSymbols
ImplementsCloneable, Serializable
The characters a DecimalFormat writes and reads – decimal and
grouping separators, minus sign, percent, currency symbol and so on.
Where the symbols come from
The device library carries no locale data of its own. What it knows about
the user’s locale – the decimal and grouping separators and the currency
symbol – it is told by the platform, which on a device reads them off
numbers Codename One’s L10NManager formatted. Everything the platform
cannot tell (percent, per mille, the exponent separator, the infinity and
not-a-number texts) is as in the US English locale.
A request that names en_US gets the US English symbols outright. Any
other locale gets the device’s symbols, since the device cannot format for
a locale other than its own. Before Codename One is initialized, and where
the platform answers nothing usable, the symbols are US English.
Constructors
public DecimalFormatSymbols() | |
public DecimalFormatSymbols(Locale locale) |
Methods
Inherited methods
Constructor details
DecimalFormatSymbols
public DecimalFormatSymbols()DecimalFormatSymbols
public DecimalFormatSymbols(Locale locale)Method details
getInstance
public static final DecimalFormatSymbols getInstance()getInstance
public static final DecimalFormatSymbols getInstance(Locale locale)getZeroDigit
public char getZeroDigit()setZeroDigit
public void setZeroDigit(char zeroDigit)getGroupingSeparator
public char getGroupingSeparator()setGroupingSeparator
public void setGroupingSeparator(char groupingSeparator)getDecimalSeparator
public char getDecimalSeparator()setDecimalSeparator
public void setDecimalSeparator(char decimalSeparator)getPerMill
public char getPerMill()setPerMill
public void setPerMill(char perMill)getPercent
public char getPercent()setPercent
public void setPercent(char percent)getDigit
public char getDigit()setDigit
public void setDigit(char digit)getPatternSeparator
public char getPatternSeparator()setPatternSeparator
public void setPatternSeparator(char patternSeparator)getInfinity
public String getInfinity()setInfinity
public void setInfinity(String infinity)getNaN
public String getNaN()setNaN
public void setNaN(String nan)getMinusSign
public char getMinusSign()setMinusSign
public void setMinusSign(char minusSign)getCurrencySymbol
public String getCurrencySymbol()setCurrencySymbol
public void setCurrencySymbol(String currency)getInternationalCurrencySymbol
public String getInternationalCurrencySymbol()setInternationalCurrencySymbol
public void setInternationalCurrencySymbol(String currencyCode)getMonetaryDecimalSeparator
public char getMonetaryDecimalSeparator()setMonetaryDecimalSeparator
public void setMonetaryDecimalSeparator(char sep)getExponentSeparator
public String getExponentSeparator()setExponentSeparator
public void setExponentSeparator(String exp)clone
public Object clone()Object.clone()
answers null on the device for anything but an array.equals
public boolean equals(Object obj)hashCode
public int hashCode()