commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michele Rossi <michele.ro...@gmail.com>
Subject [csv] should CSVRecord's values() method be public?
Date Sun, 15 Sep 2013 19:05:54 GMT
hi,
I am trying to use commons-csv for a simple CSV transformation tool and I
have encountered a couple of issues that I would like to discuss.

The CSVPrinter takes object arrays as input but the "values" method of
CSVRecord is not public.

In the code I am writing I check a condition to determine whether I should
transform the CSVRecord or not.
But the if that condition returns "false" I am forced to make an akward
copy of the
CSVRecord in an object array as
- CSVRecord objects can not be fed to CSVPrinter
- CSVRecord's values() method is not public

If "values()" was public I could use the data read from one CSV to directly
feed another CSV.

Seems a reasonable use case.

Also, shouldn't CSVRecord implement Map<String, String> ?
The key could be the column header.
It would make sense right?
Or am I missing something?


thanks,
Michele

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message