com.projectnine.csvmapper
Interface CsvFieldFormatter

All Known Implementing Classes:
BigDecimalCsvFieldFormatter, CurrentXmlGregorianCalendarFieldFormatter, NoopCsvFieldFormatter, StringToTrimmedStringCsvFieldFormatter

public interface CsvFieldFormatter

Format the String value from the CSV file to some other Object.

Author:
robweber

Method Summary
 java.lang.String formatObject(java.lang.Object object)
          Converts an Object to a String.
 java.lang.Object formatString(java.lang.String rawPropertyValue)
          This method converts the String to an Object.
 

Method Detail

formatString

java.lang.Object formatString(java.lang.String rawPropertyValue)
This method converts the String to an Object. If an error occurs during the conversion, a RuntimeException may be thrown here. If that does happen, it is possible that only the current CSV record is tainted. Invoke CsvToObjectMapper.loadNextRecord() and try again.

Parameters:
rawPropertyValue -
Returns:
An Object representation of the given String.

formatObject

java.lang.String formatObject(java.lang.Object object)
Converts an Object to a String.

Parameters:
object - The Object to convert into a String.
Returns:
A String representation of the given Object.


Copyright © 2008. All Rights Reserved.