The Map<V, K> interface declares method
public V get(Object key)
and not
public V get(K key)
The idea is that, for example, for Map<String, String>, you're free to pass
any Object as key but you should simply get null if you pass anything that
is not String. That's why I thought the best option should be to override
get(Object key) method, and not to add get(String key) method (which is not
declared in the original Map interface). Turns out the latter option
actually works with Velocity.

At first I was using Velocity 1.4, but I see that version 1.7 behaves the
same way.
-- 
View this message in context: 
http://old.nabble.com/Can%27t-acces-map-values-when-get%28%29-is-overriden-tp31955214p31971816.html
Sent from the Velocity - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to