public class PercentageDecimalFieldProcessor extends Object implements FieldProcessor<BigDecimal>
| Modifier and Type | Field and Description |
|---|---|
static BigDecimal |
HUNDRED |
| Constructor and Description |
|---|
PercentageDecimalFieldProcessor(boolean pre,
String symbol,
FieldProcessor<BigDecimal> numberProcessor,
String nullValue) |
| Modifier and Type | Method and Description |
|---|---|
BigDecimal |
cast(Object o)
For lenient writer: cast an objet to T type
|
BigDecimal |
toObject(String text)
Prepare a value for a consumer
|
String |
toString(BigDecimal value)
Prepare a value for CSV file.
|
public static final BigDecimal HUNDRED
public PercentageDecimalFieldProcessor(boolean pre,
String symbol,
FieldProcessor<BigDecimal> numberProcessor,
String nullValue)
public BigDecimal toObject(String text) throws MetaCSVReadException
FieldProcessortoObject in interface FieldProcessor<BigDecimal>text - the CSV valueMetaCSVReadException - if the text can't be converted to a T value.public String toString(BigDecimal value)
FieldProcessortoString in interface FieldProcessor<BigDecimal>value - the valuepublic BigDecimal cast(Object o)
FieldProcessorcast in interface FieldProcessor<BigDecimal>o - the objectCopyright © 2020–2021. All rights reserved.