public class ParseBigDecimal extends CellProcessorAdaptor implements StringCellProcessor
BigDecimal).
If the data uses a character other than "." as a decimal separator (France uses "," for example), then use the constructor that accepts a DecimalFormatSymbols object, as it will convert the character to a "." before creating the BigDecimal.
next| Constructor and Description |
|---|
ParseBigDecimal()
Constructs a new ParseBigDecimal processor, which converts a String to a BigDecimal.
|
ParseBigDecimal(CellProcessor next)
Constructs a new ParseBigDecimal processor, which converts a String to a BigDecimal then calls the next
processor in the chain.
|
ParseBigDecimal(DecimalFormatSymbols symbols)
Constructs a new ParseBigDecimal processor, which converts a String to a BigDecimal using the supplied
DecimalFormatSymbols object to convert any decimal separator to a "." before creating the BigDecimal.
|
ParseBigDecimal(DecimalFormatSymbols symbols,
CellProcessor next)
Constructs a new ParseBigDecimal processor, which converts a String to a BigDecimal using the supplied
DecimalFormatSymbols object to convert any decimal separator to a "." before creating the BigDecimal,
then calls the next processor in the chain.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
execute(Object value,
CsvContext context)
This method is invoked by the framework when the processor needs to process data or check constraints.
|
toString, validateInputNotNullpublic ParseBigDecimal()
public ParseBigDecimal(DecimalFormatSymbols symbols)
symbols - the decimal format symbols, containing the decimal separatorNullPointerException - if symbols is nullpublic ParseBigDecimal(CellProcessor next)
next - the next processor in the chainNullPointerException - if next is nullpublic ParseBigDecimal(DecimalFormatSymbols symbols, CellProcessor next)
symbols - the decimal format symbols, containing the decimal separatornext - the next processor in the chainNullPointerException - if symbols or next is nullpublic Object execute(Object value, CsvContext context)
execute in interface CellProcessorSuperCsvCellProcessorException - if value is null, isn't a String, or can't be parsed as a BigDecimalCopyright © 2007-2012 Super CSV. All Rights Reserved.