commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Todd Jonker <...@pobox.com>
Subject Re: [collections] Question about CollectionUtils semantics
Date Tue, 28 Jan 2003 16:26:41 GMT
Agreed.  Documentation is absolutely needed.  In fact, this exact issue cost
me several hours of debugging time when I first started using the library.
The fact is that, for example, ArrayList operations work fine without hash,
but CollectionUtils augmentations don't.

Like Greg, I very rarely implement hash, since I tend not to need it, and
its a major pain to code properly.

.T.

On 1/28/03 11:06 AM, greg@codaware.com wrote:

> Peter...
> 
> Ok, fair enough.  Point well taken.  If I expect hash-related data
> structures to
> work I need to complete the implementation of my objects.  But...  are you
> advocating that a programmer have intimate knowledge of an API's
> implementation
> in order to get the "expected" semantics?  The fact remains that there
> is a behavior
> difference between the commons and java APIs, for whatever reason.
> Neither documentation set stresses the importance of implementing #hashCode
> (and at least in my experience this is not something I would commonly do
> for every object I create).  At the very least this should be documented
> heavily
> to reset users' expectations or the semantics changed.
> 
> Regards,
> Greg

-- 
    WAR is NOT a NECESSITY

    http://www.UnitedForPeace.org/
    http://www.NotInOurName.net/
    http://www.MoveOn.org/



Mime
View raw message