commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <>
Subject Re: [collections] CaseInsensitiveHashMap
Date Sat, 03 Jan 2004 23:46:40 GMT
From: "Phil Steitz" <>
> <side comment>
> It is interesting to note that what is going on here is that a
> CaseInsensitiveMap is a map on equivalence classes of keys and the design
> question is whether to store canonical equivalence class representatives
> and use canonicalized access functions or to implement the equivalence
> relation internally.  The advantage of the second approach is that you can
> recover the keys exactly as they have been entered, the disadvantage is
> that one-time canonicalization may be more efficient.
> </side comment>

There is another possibility. Store both the original and lower case key in
the Entry. (Subclass HashEntry with an extra lowerCaseKey field) isEqualKey
then checks against the lowerCaseKey

Maybe I'm making more out of this than I need...


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

View raw message