com.projectnine.csvmapper
Class BigDecimalCsvFieldFormatter

java.lang.Object
  extended by com.projectnine.csvmapper.BigDecimalCsvFieldFormatter
All Implemented Interfaces:
CsvFieldFormatter

public class BigDecimalCsvFieldFormatter
extends java.lang.Object
implements CsvFieldFormatter

Format the String value from the CSV file to a BigDecimal.

Author:
robweber

Constructor Summary
BigDecimalCsvFieldFormatter()
           
 
Method Summary
 java.lang.String formatObject(java.lang.Object object)
          Converts an Object to a String.
 java.lang.Object formatString(java.lang.String rawPropertyValue)
          If the CSV String value is non-numeric, an Exception will be thrown here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BigDecimalCsvFieldFormatter

public BigDecimalCsvFieldFormatter()
Method Detail

formatString

public final java.lang.Object formatString(java.lang.String rawPropertyValue)
If the CSV String value is non-numeric, an Exception will be thrown here.

Specified by:
formatString in interface CsvFieldFormatter
Parameters:
rawPropertyValue - The string representation of the BigDecimal.
Returns:
A BigDecimal Object.

formatObject

public final java.lang.String formatObject(java.lang.Object object)
Description copied from interface: CsvFieldFormatter
Converts an Object to a String.

Specified by:
formatObject in interface CsvFieldFormatter
Parameters:
object - A BigDecimal Object.
Returns:
The String representation of the BigDecimal.


Copyright © 2008. All Rights Reserved.