commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: [CSV] Should the Builder API be optional?
Date Tue, 26 Mar 2013 16:06:51 GMT
On Tue, Mar 26, 2013 at 12:03 PM, Emmanuel Bourg <ebourg@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.
>

By adding parse to the builder, we can make the builder less visible. I
think I'll add that.

Gary

>
> Emmanuel Bourg
>
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

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