struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McGrady <m...@michaelmcgrady.com>
Subject RE: [OT] Case insensitive Map keys
Date Thu, 12 Feb 2004 23:07:49 GMT
Lord, Freddy, chill.  That is harsh language to someone who is only trying 
to help.  I was tempted to give the same answer, as the question does not 
make much sense to me.  If you want to access something this way, that is 
the only answer really.  So, what else is there to give them?

At 04:19 AM 2/12/2004, you wrote:
>Navjot,
>
>I believe this is exactly what Guillermo CLEARLY stated he had already 
>tried (and is not efficient enough for him).
>
>If you had taken a little bit longer and read carefully, then maybe you'd 
>have noticed.
>
>Regards,
>Freddy.
>
>-----Mensaje original-----
>De: Navjot Singh [mailto:navjot.s@net4india.net]
>Enviado el: jueves, 12 de febrero de 2004 13:14
>Para: Struts Users Mailing List; gmeyer@sib.interbanking.com.ar
>Asunto: RE: [OT] Case insensitive Map keys
>
>yes. here it is.
>
>public CIMap extends HashMap
>{
>
>         public Object get(String key)
>         {
>                 return super.get(key.toLowerCase());
>         }
>
>         public Object put(String key, Object value)
>         {
>                 super.put(key.toLowerCase(),value);
>         }
>}
>
>This was simple implementation. By the time you ask the Q and wait for
>reply. you could have written on your own.
>
>Navjot Singh
>
>
> >-----Original Message-----
> >From: Guillermo Meyer [mailto:gmeyer@interbanking.com.ar]
> >Sent: Thursday, February 12, 2004 5:24 PM
> >To: 'Struts Users Mailing List'
> >Subject: [OT] Case insensitive Map keys
> >
> >
> >Hi:
> >Does anyone know an implementation of Map where keys are String and case
> >insensitive?
> >I want to do this:
> >
> >map.put("propertyName", "DATA");
> >
> >And then, I should be able to get the value like this:
> >Object obj = map.get("PROPERTYNAME");
> >
> >Or like this:
> >Object obj = map.get("propertyname"); //or whatever. case insensitive.
> >
> >We tried using toUppercase when putting and toUppercase when getting,
> >and using equalsIgnoreCase but this is not as efficient as we need.
> >May there be a way to calculate a hash for strings in upper or lower
> >case to result in the same value?
> >
> >Thanks in advance.
> >
> >Guillermo.
> >
> >
> >NOTA DE CONFIDENCIALIDAD
> >Este mensaje (y sus anexos) es confidencial, esta dirigido
> >exclusivamente a las personas direccionadas en el mail y puede
> >contener informacion (i)de propiedad exclusiva de Interbanking
> >S.A. o (ii) amparada por el secreto profesional. Cualquier opinion
> >en el contenido, es exclusiva de su autor y no representa
> >necesariamente la opinion de Interbanking S.A. El acceso no
> >autorizado, uso, reproduccion, o divulgacion esta prohibido.
> >Interbanking S.A no asumira responsabilidad ni obligacion legal
> >alguna por cualquier informacion incorrecta o alterada contenida
> >en este mensaje. Si usted ha recibido este mensaje por error, le
> >rogamos tenga la amabilidad de destruirlo inmediatamente junto con
> >todas las copias del mismo, notificando al remitente. No debera
> >utilizar, revelar, distribuir, imprimir o copiar este mensaje ni
> >ninguna de sus partes si usted no es el destinatario. Muchas gracias.
> >
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message