how can I implement Comparable more than once?

后端 未结 3 817
情歌与酒
情歌与酒 2020-12-31 05:15

I\'m upgrading some code to Java 5 and am clearly not understanding something with Generics. I have other classes which implement Comparable once, which I\'ve been able to i

3条回答
  •  悲哀的现实
    2020-12-31 05:48

    Having multiple implementations of generic interfaces would run into problems when you consider wildcards.

    This does not depend upon erasure.

提交回复
热议问题