I have an interface like this:
public interface DataObject {
...
public void copyFrom(DataObject source);
...
}
And a class that implements it:
public class DataObjectImpl implements DataObject {
...
@Override
public void copyFrom(final DataObject source) {...}
public void copyFrom(final DataObjectImpl source) {...}
...
}
Is there any way that I can enforce the implementation of a "public void copyFrom(DataObjectImpl source)" method in the DataObject interface, using generics or otherwise?