Say I have the following interface:
public interface Renderer {
...
public <T> void setBackingGraphics(T t);
}
How do I now implement the interface in a way that specifies what specific "T" to use?
@Override
public <Graphics> void setBackingGraphics(Graphics t) {
...
}
The above obviously doesn't work because "Graphics" will just be considered to be another placeholder. How do I actually make it "usable"? Let me demonstrate what I mean by using generic classes as example:
public interface A<T> {
T someT();
}
public class C extends A<B> {
B someT(){...}
}
How does the above work if I only want to apply it to specific methods?