I have a class:
class MyClass {
public MyClass getParent() { ... }
public MyClass[] getChildren() { ... }
....
}
and a subclass
Depending on what you are actually trying to do, either make your base class abstract and add getId():
abstract class MyClass() {
public MyClass getParent() { ... }
public MyClass[] getChildren() { ... }
public String getId();
....
}
MySubClass extends MyClass() {
@Overrides
public String getId() { }
...
}
Alternatively, depending on your requirements, implement getId() in your base class:
class MyClass() {
public MyClass getParent() { ... }
public MyClass[] getChildren() { ... }
public String getId() { }
....
}
MySubClass extends MyClass() {
...
}