com.ebasetech.ufs.utility
Class RegionalNumberFormatter
java.lang.Object
com.ebasetech.ufs.utility.RegionalNumberFormatter
- All Implemented Interfaces:
- RegionalFormatter
- public class RegionalNumberFormatter
- extends java.lang.Object
- implements RegionalFormatter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
space160
static final char space160
- See Also:
- Constant Field Values
space32
static final char space32
- See Also:
- Constant Field Values
decimalFormat
private NumberFormat decimalFormat
decimalChar
private char decimalChar
RegionalNumberFormatter
public RegionalNumberFormatter(java.lang.String languageId)
setMaximumFractionDigits
public void setMaximumFractionDigits(int maxFractionDigits)
setMinimumFractionDigits
public void setMinimumFractionDigits(int minFractionDigits)
setIntegerOnly
public void setIntegerOnly(boolean value)
formatWithDigitSeparators
public void formatWithDigitSeparators(boolean value)
getDecimalSeparator
public char getDecimalSeparator()
getGroupSeparator
public char getGroupSeparator()
formatNumber
public java.lang.String formatNumber(java.math.BigDecimal number)
- format a Number into a string, according to the rules of this number formatter
parseNumber
public java.math.BigDecimal parseNumber(java.lang.String number)
throws java.text.ParseException
- parse a string into a Number, according to the rules of this number formatter
- Throws:
java.text.ParseException
wouldRequireRounding
public boolean wouldRequireRounding(java.lang.String value)
throws java.text.ParseException
- Throws:
java.text.ParseException
formatInteger
public java.lang.String formatInteger(java.math.BigInteger number)
- format a Number into a string, according to the rules of this number formatter
parseInteger
public java.math.BigInteger parseInteger(java.lang.String number)
throws java.text.ParseException
- parse a string into a Number, according to the rules of this number formatter
- Throws:
java.text.ParseException
getFormatSymbols
public java.util.Map getFormatSymbols()
format
private java.lang.String format(NumberFormat format,
java.lang.Number number)
parse
private java.lang.Number parse(NumberFormat format,
java.lang.String number)
throws java.text.ParseException
- Throws:
java.text.ParseException