public class ConverterCurrency extends AbstractCsvConverter
Currency
instance.errorLocale, locale, type, writeLocale
Constructor and Description |
---|
ConverterCurrency(Locale errorLocale)
Initializes the class.
|
Modifier and Type | Method and Description |
---|---|
Object |
convertToRead(String value)
Method for converting from a string to the proper data type of the
destination field.
|
String |
convertToWrite(Object value)
Converts
Currency instance to a string. |
setErrorLocale, setLocale, setType, setWriteLocale
public ConverterCurrency(Locale errorLocale)
errorLocale
- The locale to use for error messagespublic Object convertToRead(String value) throws CsvDataTypeMismatchException
CsvConverter
value
- The ISO 4217 currency code string to be convertedCurrency
instanceCsvDataTypeMismatchException
- If the input string cannot be converted into
the proper typepublic String convertToWrite(Object value) throws CsvDataTypeMismatchException
Currency
instance to a string.convertToWrite
in interface CsvConverter
convertToWrite
in class AbstractCsvConverter
value
- The Currency
instancenull
if value was null
CsvDataTypeMismatchException
- If the value is not a Currency
Copyright © 2005–2023. All rights reserved.