public class CustomPreferenceBuilder extends java.lang.Object implements PreferenceBuilder
PreferenceBuilder
that allows for custom csv formats.In the adapter configuration file this class is aliased as csv-custom-preference-builder which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
CustomPreferenceBuilder() |
Modifier and Type | Method and Description |
---|---|
org.supercsv.prefs.CsvPreference |
build()
Create the CSVFormat.
|
java.lang.Character |
getDelimiter() |
java.lang.Boolean |
getIgnoreEmptyLines() |
java.lang.Character |
getQuoteChar() |
java.lang.String |
getRecordSeparator() |
void |
setDelimiter(java.lang.Character d)
Set the delimiter for the CSV file.
|
void |
setIgnoreEmptyLines(java.lang.Boolean b)
Specify whether or not to ignore empty lines.
|
void |
setQuoteChar(java.lang.Character quoteChar)
Set the quote character for the CSV file.
|
void |
setRecordSeparator(java.lang.String sep)
Set the record separactor
|
public java.lang.Character getDelimiter()
public void setDelimiter(java.lang.Character d)
d
- the delimiter; if not specified, defaults to ,
public java.lang.Character getQuoteChar()
public void setQuoteChar(java.lang.Character quoteChar)
quoteChar
- the delimiter; if not specified, defaults to "
public java.lang.Boolean getIgnoreEmptyLines()
public void setIgnoreEmptyLines(java.lang.Boolean b)
b
- true or false, if not specified false.public java.lang.String getRecordSeparator()
public void setRecordSeparator(java.lang.String sep)
sep
- the record separator; if not specified defaults to "\r\n"public org.supercsv.prefs.CsvPreference build()
PreferenceBuilder
build
in interface PreferenceBuilder