commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <ebo...@apache.org>
Subject Re: [csv] Java 5?
Date Thu, 10 Nov 2011 09:11:12 GMT
Le 10/11/2011 09:21, James Carman a écrit :
> It might need a rename, since it looks like its scope has changed.  It
> doesn't really just deal with CSV files anymore.  It allows custom
> delimiter characters.  I have a few other suggestions as well:

Do you have another name in mind?


> 1.  Change the char properties that can be "disabled" to Character
> objects.  Thus, a null value indicates disabling that feature?

I was about to do this but I refrained because it doesn't apply to all 
the character properties. For example the delimiter can't really be 
disabled.


> 2.  Change references to CSV to Csv in the class names.

I'm hesitating on this one. There are many examples in the JDK of the 
uppercase form (XMLFormatter, SAXParser, URLConnection, etc). For a 
short 3-letters acronym I think it's fine, but for a longer one I would 
downcase (CorbaConnection, SaslException are other examples in the JDK).


> 3.  Use a "builder" pattern to define the formats.

Done already! The format is now immutable and uses chained withXXX 
setters as suggested by Stephen.

I'm pondering the removal of the constructor taking all the parameters 
to force the use of the builder pattern. Once removed we could delete 
the DISABLED constant, since there is no point enabling a feature and 
disabling it afterward (we always start disabled by default).

Emmanuel Bourg

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


Mime
View raw message