Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 95913 invoked from network); 24 Nov 2003 15:04:13 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 24 Nov 2003 15:04:13 -0000 Received: (qmail 97535 invoked by uid 500); 24 Nov 2003 15:03:47 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 97441 invoked by uid 500); 24 Nov 2003 15:03:46 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 97387 invoked from network); 24 Nov 2003 15:03:46 -0000 Received: from unknown (HELO web20706.mail.yahoo.com) (216.136.226.179) by daedalus.apache.org with SMTP; 24 Nov 2003 15:03:46 -0000 Message-ID: <20031124150345.55484.qmail@web20706.mail.yahoo.com> Received: from [32.97.110.142] by web20706.mail.yahoo.com via HTTP; Mon, 24 Nov 2003 07:03:45 PST Date: Mon, 24 Nov 2003 07:03:45 -0800 (PST) From: David Graham Subject: Re: [collections] CaseInsensitiveHashMap To: Jakarta Commons Developers List In-Reply-To: <3FC17A36.7040703@earthlink.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --- Brian S O'Neill wrote: > This implementation converts the key to lowercase on every get and put, > which adds a bit of object allocation overhead. How else would you accomplish the class' goal? > 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. I couldn't find any such comment in the javadocs http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html#regionMatches(boolean, int, java.lang.String, int, int) > > What I always do when I want a case-insensitive map is to construct a > TreeMap with String.CASE_INSENSITIVE_ORDER. We don't want a sorted Map implementation, just an implementation with case insensitive Strings as keys. Also, TreeMap is known to be much slower than HashMap. David > > 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: commons-dev-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > __________________________________ 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