commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Graham <grahamdavid1...@yahoo.com>
Subject Re: [collections] CaseInsensitiveHashMap
Date Mon, 24 Nov 2003 15:15:16 GMT

--- Janek Bogucki <yan@studylink.com> wrote:
> On Sun, 2003-11-23 at 21:53, Phil Steitz wrote:
> > A few weeks back, David Graham submitted code for a 
> > CaseInsensitiveHashMap here:
> > 
> > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24537
> > 
> > This looks like a good addition to [collections] to me.
> > 
> > Any objections to my coding up some tests and adding this class to the
> 
> > map package?
> > 
> > Phil

> 
> It might be best to use an instance of o.a.c.c.decorators.TransformedMap
> with a lower case key transformer and a null value transformer to
> implement this class. Even though the posted implementation is simple,
> using the decorator removes the need to have the 'plumbing' code
> currently present -- and illustrates the use of the collections library.
> 

That's a good idea.  I was not aware of TransformedMap or the Transformer
interface.  It seems like they were designed to avoid writing classes like
CaseInsensitiveHashMap :-).  However, it only transforms objects on put()
calls and not on get().  That behavior would need to change.

David

> -Janek 
> 



__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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