public abstract class SequenceItemHolder {
public SequenceItemHolder(View itemView) {
}
public abstract void setData(SequenceRowElement.RowElement rowElement);
public static class TesteItemHolder extends SequenceItemHolder {
public TesteItemHolder(View itemView) {
}
@Override
public void setData(SequenceRowElement.TestRowElement rowElement) {
}
}
}
Please can somebody explain me why do I get a compile error in the override?
Please how to fix it (without using an interface)?
NOTE: TestRowElement extends RowElement
Error 1
public SequenceItemHolder(View itemView) {
super(itemView);
}
Object doesn't have a constructor taking a View as parameter. Remove the super call.
Error 2
public abstract void setData(SequenceRowElement.RowElement rowElement) {}
abstract methods should not have a body. replace it with this:
public abstract void setData(SequenceRowElement.RowElement rowElement);
Error 3
Your overriden method should have the same parameter type as the abstract one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With