Thanks for the excellent FAQ! I have another question for it (although
whether it is frequently asked remains to be seen!
I have the following interface:
public interface DataConverter<I,O> {
public O convert(I obj);
}
It appears that it should be legal to define the following method:
/**
* Returns a Map<Class,DataConverter> that maps Java classes
* to DataConverter objects that know how to operate on
* data of the type specified by the map's keys.
*/
public <C extends Class> Map<C,DataConverter<? extends C,?>>
getDataConverters();
I cannot, however, figure out exactly how to instantiate a Map that I
could actually return from an implementation of this method!
Any help would be greatly appreciated.
Kris
Angelika Langer wrote:
> I've been putting together a page with FAQs regarding Java Generics at
> http://www.langer.camelot.de/Generic...nericsFAQ.html.
>
> It was intially intended as companion material to my seminars, but it
> may well be of interest to a broader audience. It should at least
> answer many of the beginner's questions. If you're interested, feel
> free to use it. Comments are welcome.
>
> Angelika Langer