commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael A. Smith" <>
Subject Re: [Collections] Naming conventions
Date Sat, 15 Jun 2002 16:15:49 GMT
On Sat, 15 Jun 2002, Stephen Colebourne wrote:
> I thought part of the aim of the Utils was to avoid having top level
> classes, even if they are package scoped.

yeah, in a way.  They coule also be looked at as convenience methods 
where you only need to import one class name to get all of the 
functionality rather than importing each that you need. 

> The problem as I see it is that someone new to the package will come along
> and see maybe 60+ classes in the collections package. However, over half
> could be package scoped with no way to tell. (I reckon most people would
> scan the class names first, either as java files or javadoc.) By defining
> them as static nested classes (package scoped) we avoid the visibility
> issue. Joshua Bloch's book described it as reducing the 'conceptual size' of
> the API.

I wouldn't want all 60+ classes in the collections package, even when 
package private.  To start, I believe adding them as inner classes or 
non-public outer classes in the file would be a good 
starting point (hence they aren't exposed in javadoc or as .java files).  
Then, if a compelling need arises, we can make them public classes, but 
in a separate package (e.g. "org.apache.commons.collections.decorators").


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message