|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jsefa.common.converter.BigDecimalConverter
public class BigDecimalConverter
Converter for BigDecimal
objects.
The format consists of two String
s. The first denotes the Locale
and the second is a
pattern as used by DecimalFormat
.
It is thread-safe (the access to the non-thread-safe DecimalFormat
is synchronized).
Constructor Summary | |
---|---|
protected |
BigDecimalConverter(SimpleTypeConverterConfiguration configuration)
Constructs a new BigDecimalConverter . |
Method Summary | |
---|---|
static BigDecimalConverter |
create(SimpleTypeConverterConfiguration configuration)
Creates a BigDecimalConverter . |
BigDecimal |
fromString(String value)
Converts the given String object into an object with the simple data type this converter is
intended for. |
protected String[] |
getDefaultFormat()
Returns the default format which is used when no format is given. |
String |
toString(Object value)
Converts the given value to a String object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected BigDecimalConverter(SimpleTypeConverterConfiguration configuration)
BigDecimalConverter
.getDefaultFormat()
) is used.
configuration
- the configuration
ConversionException
- if the given format is not valid.Method Detail |
---|
public static BigDecimalConverter create(SimpleTypeConverterConfiguration configuration)
BigDecimalConverter
.getDefaultFormat()
) is used.
configuration
- the configuration
ConversionException
- if the given format is not valid.public final BigDecimal fromString(String value)
String
object into an object with the simple data type this converter is
intended for.
fromString
in interface SimpleTypeConverter
value
- the String
object to convert
public final String toString(Object value)
String
object.
toString
in interface SimpleTypeConverter
value
- the value to convert
protected String[] getDefaultFormat()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |