Constructor and Description |
---|
VoidConverter() |
Modifier and Type | Method and Description |
---|---|
Void |
configure(String format,
long flags,
ColumnInfo<Void> fieldInfo)
Configure this instance of the converter based on the associated params.
|
boolean |
isAlwaysTrimInput()
Returns true if the field should trim the string before it is passed to
Converter.stringToJava(String, int, int, ColumnInfo, String, ParseError) . |
boolean |
isNeedsQuotes(Void configInfo)
Returns true if the field needs to be quoted in the CSV output.
|
String |
javaToString(ColumnInfo<Void> columnInfo,
Void value)
Converts from a Java representation to string.
|
Void |
stringToJava(String line,
int lineNumber,
int linePos,
ColumnInfo<Void> columnInfo,
String value,
ParseError parseError)
Converts from a string representation to Java.
|
public Void configure(String format, long flags, ColumnInfo<Void> fieldInfo)
Converter
configure
in interface Converter<Void,Void>
format
- Optional string format which affects the output and parsing of the field. Null if none supplied in
which case the default format is used.flags
- Optional numerical flags which affect the output and parsing of the field. 0 if no flags supplied.fieldInfo
- Information about the field associated with this converter.public boolean isNeedsQuotes(Void configInfo)
Converter
isNeedsQuotes
in interface Converter<Void,Void>
public boolean isAlwaysTrimInput()
Converter
Converter.stringToJava(String, int, int, ColumnInfo, String, ParseError)
.isAlwaysTrimInput
in interface Converter<Void,Void>
public String javaToString(ColumnInfo<Void> columnInfo, Void value)
Converter
javaToString
in interface Converter<Void,Void>
columnInfo
- Information about the column we are processing.value
- Value of the field that we are converting.public Void stringToJava(String line, int lineNumber, int linePos, ColumnInfo<Void> columnInfo, String value, ParseError parseError)
Converter
stringToJava
in interface Converter<Void,Void>
line
- Line we are processing for logging purposes.lineNumber
- Number of the line we are processing for logging purposes.linePos
- Position in the line that we are converting to identify what part of the line contains the value.columnInfo
- Information about the column we are processing.value
- Value of the field that we are converting.parseError
- Parse error which can we use to set information about parse errors here. If there are no parse errors
then just ignore this field. Any exceptions thrown will also be caught and interpreted as errors.ParseError.ErrorType.NONE
.This documentation content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.