This all sounds good to me. Gary On May 1, 2016 12:05 PM, "Benedikt Ritter" <brit...@apache.org> wrote:
> Hi, > > I often seeing myself doing the following when my csv file has a header > row: > > CSVFormat.RFC4180 > .withHeader() // use first row as header > .withSkipHeaderRecord(); > > How about combining the two into a method called withFirstRecordAsHeader() > or something like that? > > Further more I find it unsymmetrical that I can retrieve a column value > from CSVRecord using an enum, but I cannot pass an enum to CSVFormat to > define a header. So I'd like to add a new overload of withHeader: > > withHeader(Class<? extends Enum> headers) > > The method would iterate over the enum values defined by the class and use > the name() method on each value for defining the header. This way I can > define an enum for my headers, use it when specifying the format and when > retrieving values from the records. > > Thoughts? > Benedikt >