This implementation converts the key to lowercase on every get and put, which adds a bit of object allocation overhead. Also, simply converting to lowercase does not make it fully case-insensitive. There is a comment in String.regionMatches that brings up something about the Georgian alphabet.

What I always do when I want a case-insensitive map is to construct a TreeMap with String.CASE_INSENSITIVE_ORDER.

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


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to