Salute Julien !

> Sure it's improving the typing, but does it really simplify the code ?

When I wrote "simplification" I was referring to the unnecessary cast, that
is required in mina 2. My proposal is not simpler that the current mina 3
implementation. Infact the user have to do a bit more because the type must
be specified when the key is constructed ! The Framework-User should not be
able to make simple mistakes like accidentally set an instance of Date
where an Integer is requiered.

Joshua Bloch describes that pattern in detail in his book "Effectiv Java -
2nd Edition" -> Item29: Consider Typesafe heterogeneous containers.
Here is a example :
http://blogs.oracle.com/terrygardner/entry/a_typesafe_heterogeneous_container_for

Christian

Reply via email to