Let's say I have this interface:
public interface i{
void setImage(Image image);
}
I want that class methods that implements that interface method are allowed to accept as method paramether not only Image, but all classes that extends Image.
What I need inside the interface is something like:
<T extends Image> void setImage(T image);
But of course, this is not the right way to do it How should I write a generic method in an Interface?