I have following hierarchy in java
for my interface
public interface Identifiable<T extends Comparable<T>> extends Serializable {
public T getId();
}
public interface Function extends Identifiable {
public String getId();
}
public abstract class Adapter implements Function {
public abstract String getId();
}
When I try to implement Adapter
in scala
as follows
class MultiGetFunction extends Adapter {
def getId() : String = this.getClass.getName
}
I am getting following error
Multiple markers at this line
- overriding method getId in trait Identifiable of type ()T; method getId has incompatible
type
- overrides Adapter.getId
- implements Function.getId
- implements Identifiable.getId