[
https://issues.apache.org/jira/browse/CSV-266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17230141#comment-17230141
]
Gary D. Gregory edited comment on CSV-266 at 11/11/20, 7:11 PM:
----------------------------------------------------------------
Hi [~sbublava]
Please feel free to provide a PR on GitHub but... why do you need
{{CSVPrinter.printRecord(CSVRecord)}} since {{CSVRecord}} implements
{{Iterable<String>}} and we already have
{{CSVPrinter.printRecord(Iterable<?>)}}?
See {{org.apache.commons.csv.CSVPrinterTest.testPrintRecordsWithCSVRecord()}}.
Gary
was (Author: garydgregory):
Hi [~sbublava]
Please feel free to provide a PR on GitHub but... why do you need
{{CSVPrinter.printRecord(CSVRecord)}} since {{CSVRecord}} implements
{{Iterable<String>}}?
See {{org.apache.commons.csv.CSVPrinterTest.testPrintRecordsWithCSVRecord()}}.
Gary
> CSVRecord.toList() should be public
> -----------------------------------
>
> Key: CSV-266
> URL: https://issues.apache.org/jira/browse/CSV-266
> Project: Commons CSV
> Issue Type: Improvement
> Components: Printer
> Affects Versions: 1.8
> Reporter: Stephan Bublava
> Priority: Minor
>
> I need to write CSVRecord instances to a file.
> CSVPrinter supports:
> * void printRecord(final Object... values)
> * void printRecords(final Iterable<?> values)
> but CSVRecords only offers:
> * Iterator<String> iterator()
> This is cumbersome, because I have to perform a (superfluous) Iterator ->
> List conversion to make this work.
> Please make CSVRecord.toList() public or add
> CSVPrinter.printRecord(CSVRecord).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)