mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eero Nevalainen <eero.nevalai...@indagon.com>
Subject setEnumAttribute?
Date Tue, 22 May 2007 10:18:30 GMT
I was thinking about an earlier discussion about setting attributes last 
night. One thing that bugs me a bit is that the key is a String and 
someone else might be using that same String as their key.

So I had the thought of setting attributes with Enums. Mapping to the 
correct enum class and then with the enum key would probably "eliminate" 
an accidental key collision.

This could even be implemented without the need to calculate hashvalues, 
by making the clients store the index of their specifice enum class.

Unfortunately I also just noticed that there's no implementation for a 
ConcurrentEnumMap yet in JDK 1.6. This damps the idea quite a bit but I 
thought I'd voice it anyway.

-Eero Nevalainen

View raw message