This content has been marked as final. Show 2 replies
if you want to express either an intersection type or a unsion type then I'm afraid neither is possible with the exception of type parameter bounds (which are allowed to be intersection types, i.e. <N extends Number & Comparable<N>>).
With kind regards
I'm not even sure I understand what your question is. Is Ben right in thinking you're looking for a union type? <? extends Integer/Double> is probably a bad example since both are final concrete classes, and so <? extends Integer> matches exactly Integer. Are you just looking for a ReadFileToLabelledRelationDiagonal<Number>?
Maybe if you can say what you're trying to accomplish with a bit of code/pseudocode we can help you out. You haven't given enough information in your post for us to be of help.