public final class NumberFormatter extends DataFormatter
DataFormatter.NUMBER
, DataFormatter.INTEGER
, DataFormatter.MONEY
.Constructor and Description |
---|
NumberFormatter()
Constructs a new instance of NumberFormatter.
|
NumberFormatter(Buffer params)
Constructs a new instance of NumberFormatter.
|
NumberFormatter(int typeId,
java.lang.String mask)
Constructs a new instance of NumberFormatter with the specified parameters.
|
NumberFormatter(java.lang.String language,
int typeId,
java.lang.String mask)
Constructs a new instance of NumberFormatter with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clone this NumberFormatter.
|
java.lang.String |
format(java.lang.Object value)
Transform a specified simple Java Object into a String.
|
double |
getRoundingDelta()
Return the delta that defines the rounding interval for this formatter.
|
int |
getTypeId()
Return the type ID supported by this DataFormatter.
|
java.lang.Object |
parse(java.lang.String text)
Transform a specified String into a simple Java Object.
|
void |
setDecimalSeparator(char separator)
Set the decimal separator for this formatter.
|
void |
setGroupingSeparator(char c)
Sets the Group Separator of the number formatter.
|
debug, getBaseTypeId, getBaseTypeMarker, getTypeId, getTypeId, getTypeName
public NumberFormatter(Buffer params) throws FndException
params
- buffer containing TYPE, MASK and LANGUAGE itemsFndException
public NumberFormatter(int typeId, java.lang.String mask) throws FndException
typeId
- one of DataFormatter.NUMBER
, DataFormatter.INTEGER
, DataFormatter.MONEY
mask
- format maskFndException
public NumberFormatter(java.lang.String language, int typeId, java.lang.String mask) throws FndException
language
- languagetypeId
- one of DataFormatter.NUMBER
, DataFormatter.INTEGER
, DataFormatter.MONEY
mask
- format maskFndException
public NumberFormatter() throws FndException
FndException
public double getRoundingDelta()
public void setDecimalSeparator(char separator)
separator
- separator characterpublic int getTypeId()
DataFormatter
getTypeId
in class DataFormatter
public java.lang.String format(java.lang.Object value)
DataFormatter
format
in class DataFormatter
public java.lang.Object parse(java.lang.String text) throws FndException
DataFormatter
parse
in class DataFormatter
FndException
public void setGroupingSeparator(char c)
c
- character to use as the Group Separator.public java.lang.Object clone()
clone
in class DataFormatter