Having trouble with comprehending generics, especially the wildcard addition. Perhaps there is someone here which could tell me about how to circumvent the oddities of type conversion in the following ...
What am I thinking wrong?
(Ok, I've studied a bit about GJ, Pizza, NextGen etc. but still ... doesn't get things right, yet.)
Regards! /Set Lonnert
Joined: Jan 15, 2005
I'm sorry if my posting is somewhat cryptic? In any way, I should perhaps be more verbose? In the code followup, kind of:
my problem is the lack of type casting give compiler warnings, warnings which I have really no idea how to handle? Casting down to what becomes raw types give me a, kind of, headache. Or at least the compiler thins so. Could anyone give me an idea on how to handle casts (with-) in type parameters correctly, that will not give unsafe type conversions? Any short sample will do, not necessarily referring to the above. (My prevois experience derives from logic, but here the logic seems to be only erasure compatible with ordinary Java. Hm.)
Yes I compile using the 1.5 or whatever version numbering they use these days. These are approx. the warnings I get:
Should there be wrappers to avoid implicit conversions to raw types (most frequent warning), or should there perhaps be a wildcard somewhere (as mentioned, I don't yet understand its significance)? Any ideas are most welcome ...
Regards! /Set Lonnert PS. I was here years ago, but then there were to few to mention .. no talk to I mean
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com