I want to create an implementation of java.util.Map which only takes String as key and value.
I tried several things
abstract class BaseMap<String,String> implements Map<K,V>
this gives a compile error mebe because I am implementing the interface and not fulfilling the full definition of Key and Value
then I tried extending the interface to define types, it does nt let me do that as well
public interface IBaseMap<String, String> extends Map<K, V>
It still gives error "The type parameter String is hiding java.lang.String"
Please help, thanks in advance
implements Map<String, String>BaseMap implements Map<String,String>orBaseMap<K,V> implements Map<K,V>...MaptoString, so yourBaseMapcannot overcome that (thus is nailed down toString, too)