+1 this is best. If the CSVParser is stateless then each of its 'with...' methods should return a new CSVParser. On Mar 26, 2013 9:03 AM, "Emmanuel Bourg" <ebo...@apache.org> wrote:
> Le 26/03/2013 16:58, Gary Gregory a écrit : > > > Is it worth providing this shortcut: > > > > Iterable<CSVRecord> parse = CSVFormat.newBuilder(). > > withCommentStart('#').withDelimiter('\t').withQuoteChar('"').parse(in); > > > > the builder would implement parse() > > I still think the builder is useless. My initial implementation looked > like this: > > Iterable<CSVRecord> parse = > > CSVFormat.DEFAULT.withCommentStart('#').withDelimiter('\t').withQuoteChar('"').parse(in); > > So yes, in this spirit the builder should implement parse(). But I would > prefer no builder at all. > > Emmanuel Bourg > > >