I have the following situation :
abstract class X { abstract X someMethod (...) {...} }.
Now I want to constrain any implementation of X to
This works as well;
abstract class X { public abstract T yourMethod(); } class X1 extends X { public X1 yourMethod() { return this; } } class X2 extends X { public X2 yourMethod() { return this; } }