I want to make an interface Mergeable that declares a method merge(). A class that implements this will have to implement the method like follows:
SomeObject.java
public class SomeObject implements Mergeable @Override public SomeObject merge(SomeObject other) {...} See that the return and parameter type are set to the implementing class. Is there a way to enforce this and how would I set the method signature in the interface?
<T>in your interface.