How can I define a map like this in Java?
Map<Class<T extends myObject>, MyObjectConverter<T>>
The problem is the T in both arguments. T should be different for each map entry. But I want the map to be restricted to key-value-pairs that "share a common T"
The following definition works, but I think there must be a better way - without CompilerWarnings:
Map<Class<? extends myObject>, MyObjectConverter>
T? Where is it declared?Tto be different for each entry?Tto be different for each key-value, but you want thoseT's to share a common superclass (eg:E). Is the superclass ofTan actual concrete class, or is that supposed to be variable as well?