Package com.opencsv
Class RFC4180ParserBuilder
- java.lang.Object
-
- com.opencsv.RFC4180ParserBuilder
-
public class RFC4180ParserBuilder extends java.lang.Object
Builder for creating a RFC4180Parser.Example code for using this class:
final RFC4180Parser parser =
new RFC4180ParserBuilder()
.withSeparator('\t')
.build();
- Since:
- 3.9
- See Also:
RFC4180Parser
-
-
Constructor Summary
Constructors Constructor Description RFC4180ParserBuilder()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RFC4180Parser
build()
Constructs RFC4180Parser.char
getQuoteChar()
char
getSeparator()
CSVReaderNullFieldIndicator
nullFieldIndicator()
RFC4180ParserBuilder
withFieldAsNull(CSVReaderNullFieldIndicator fieldIndicator)
Sets the NullFieldIndicator.RFC4180ParserBuilder
withQuoteChar(char quoteChar)
Sets the character to use for quoted elements.RFC4180ParserBuilder
withSeparator(char separator)
Sets the delimiter to use for separating entries.
-
-
-
Method Detail
-
getSeparator
public char getSeparator()
- Returns:
- The defined separator.
-
getQuoteChar
public char getQuoteChar()
- Returns:
- The defined quotation character.
-
nullFieldIndicator
public CSVReaderNullFieldIndicator nullFieldIndicator()
- Returns:
- The null field indicator.
-
build
public RFC4180Parser build()
Constructs RFC4180Parser.- Returns:
- A new RFC4180Parser with defined settings.
-
withSeparator
public RFC4180ParserBuilder withSeparator(char separator)
Sets the delimiter to use for separating entries.- Parameters:
separator
- The delimiter to use for separating entries- Returns:
- The RFC4180ParserBuilder
-
withQuoteChar
public RFC4180ParserBuilder withQuoteChar(char quoteChar)
Sets the character to use for quoted elements.- Parameters:
quoteChar
- The character to use for quoted element.- Returns:
- The RFC4180ParserBuilder
-
withFieldAsNull
public RFC4180ParserBuilder withFieldAsNull(CSVReaderNullFieldIndicator fieldIndicator)
Sets the NullFieldIndicator.- Parameters:
fieldIndicator
- CSVReaderNullFieldIndicator set to what should be considered a null field.- Returns:
- The RFC4180ParserBuilder
-
-