What is wrong with this code?
public interface FileProccessor {
public <RT> RT setHeader(RT header);
}
public class AProcessor implements FileProccessor {
@Override
public Header setHeader(Header header) {
return null;
}
}
Compilator is complaining: The method setHeader(Header) of type AProcessor must override or implement a supertype method
Edit:
Thanks. I got confused because I wanted multiple methods with different types.
Now I realized a can add as many parametrized types as I want in class level. Like FileProcessor<T, F, M>.
FileProcessor<RT>and implement it with... implements FileProcessor<Header>.RTandHeader?