I have two interfaces (not actually in the same file)
public interface UndepSendable {
default String getName() {
return "";
}
default void setName(String name) {
}
}
public interface Sendable {
default String getName() {
return SendableRegistry.getName(this);
}
default void setName(String name) {
SendableRegistry.setName(this, name);
}
// This has more methods I want, but these are the only ones I included
}
I want to implement both like this
public class PowerShuffleKPID extends KPID implements UndepSendable, Sendable {
@Override
public String getName() {
return name;
}
@Override
public void setName(String name) {
this.name = name;
}
}
I want to override the set and get name methods from UndepSendable and not Sendable. Is there a way I can specify which interface a method overrides from?