Create generic Interface restricted to own class
问题 I would like to create a generic interface for those two classes but I'm not sure how to specify the generics the right way. public class ThingA implements Thing { public ThingA createCopy(ThingA original); } public class ThingB implements Thing { public ThingB createCopy(ThingB original); } I tried it this. public interface Thing<V extends Thing<V>> { public V createCopy(V original); } But I'm still able to do things like this, which shouldn't be allowed. public class ThingB implements Thing