commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Lanzetta" <mlanze...@accelrys.com>
Subject Re: [CLI] Version 2.0 - API
Date Tue, 04 Mar 2003 21:44:03 GMT
The main points are simplicity and readability.  I use the builder almost 
exclusively in my code, and it makes the code a lot more readable (esp. 
when formatted).  You can just use instances of an Option and the setters, 
but the various constructors allow you to obfuscate exactly what you are 
doing.  With the builder, every modifier to an option is clearly stated, 
and the option is only created in its "fully-formed" state.

Regards,
Michael Lanzetta






"David Graham" <dgraham1980@hotmail.com>
03/04/2003 11:34 AM
Please respond to "Jakarta Commons Developers List"

 
        To:     commons-dev@jakarta.apache.org
        cc: 
        Subject:        Re: [CLI] Version 2.0 - API


>The builders are to help the building of complex objects
>in a verbose manner thus eliminating the confusion that
>arises due to methods with many parameters of similar type.

Why can't you just create Option instances and call setters on them to 
configure them?  I guess I'm not seeing the point of the builder.

David

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message