Closed charphi closed 3 years ago
I don't mind the class names that much, but I do agree CsvReader and CsvWriter should have fluent builders. It makes configuring them easier and less verbose, and allows instances to be immutable. For example:
CsvReader csvReader = CsvReader.builder()
.fieldSeparator(';')
.textDelimiter('\'')
.build()
Will be handled in 2.0 - see https://github.com/osiegmar/FastCSV/blob/version2-rewrite/README.md
In the current version, some class names are not clear (see https://github.com/osiegmar/FastCSV/issues/7#issuecomment-368565601). Here are some suggestions for 2.x:
Solution 1: reader, writer, fluent factories
CsvReader
CsvReaderFactory
CsvParser
CsvReader
CsvWriter
CsvWriterFactory
CsvAppender
CsvWriter
Solution 2: reader, writer, bean settings
CsvReader
CsvReaderSettings
CsvParser
CsvReader
CsvWriter
CsvWriterSettings
CsvAppender
CsvWriter
Solution 3: reader, writer, value settings
CsvReader
CsvReaderSettings
CsvParser
CsvReader
CsvWriter
CsvWriterSettings
CsvAppender
CsvWriter