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] Discussion about the new CSVFormatBuilder
Date Tue, 20 Nov 2012 20:29:50 GMT
If we followed the Splitter pattern then we would skip the call to build
can be able to call parse right away like:

CSVFormat.newBuilder(',').parse(reader);

instead of: CSVFormat.newBuilder(',').build().parse(reader);

Gary

On Tue, Nov 20, 2012 at 3:23 PM, Ted Dunning <ted.dunning@gmail.com> wrote:

> Surely you meant to say no other commons library.
>
> Builder patterns are relatively common.  See guava for instance:
>
>
> http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/base/Splitter.html
>
>
> On Tue, Nov 20, 2012 at 11:49 AM, Gary Gregory <garydgregory@gmail.com
> >wrote:
>
> >  - it has been argued that using the builder pattern only to make sure
> > > CSVFormats are valid is overengineered. No other library has this kind
> of
> > > validation.
> >
>



-- 
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