Class ParseDouble
java.lang.Object
org.supercsv.cellprocessor.CellProcessorAdaptor
org.supercsv.cellprocessor.ParseDouble
- All Implemented Interfaces:
CellProcessor, StringCellProcessor
Converts a String to a Double.
-
Field Summary
Fields inherited from class CellProcessorAdaptor
next -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new ParseDouble processor, which converts a String to a Double.Constructs a new ParseDouble processor, which converts a String to a Double, then calls the next processor in the chain. -
Method Summary
Modifier and TypeMethodDescriptionexecute(Object value, CsvContext context) This method is invoked by the framework when the processor needs to process data or check constraints.Methods inherited from class CellProcessorAdaptor
toString, validateInputNotNull
-
Constructor Details
-
ParseDouble
public ParseDouble()Constructs a new ParseDouble processor, which converts a String to a Double. -
ParseDouble
Constructs a new ParseDouble processor, which converts a String to a Double, then calls the next processor in the chain.- Parameters:
next- the next processor in the chain- Throws:
NullPointerException- if next is null
-
-
Method Details
-
execute
This method is invoked by the framework when the processor needs to process data or check constraints.- Specified by:
executein interfaceCellProcessor- Parameters:
value- the value to be processedcontext- the CSV context- Returns:
- the result of cell processor execution
- Throws:
SuperCsvCellProcessorException- if value is null, isn't a Double or String, or can't be parsed as a Double
-