public interface Foo <T> {
void setValue(T value);
}
public abstract class Bar extends JFormattedTextField{
@Override
public void setValue(Object value) {
}
}
public class FooBar extends Bar implements Foo<String>{
@Override //Foo
public void setValue(String aValue) {
// TODO Auto-generated method stub
}
@Override //Bar
public void setValue(Object aValue) {
// TODO Auto-generated method stub
}
}
This results in
Name clash: The method setValue(M) of type Foo has the same erasure as setValue(Object) of type JFormattedTextField but does not override it
Why do I get no love from the compiler and how could I fix it?