I have a problem in Java:
I have an interface:
public interface I extends Cloneable {
}
and an abstract class:
public abstract class AbstractClass {
private I i;
public I i() {
return (I)(i).clone();
}
}
but the usage of clone() yields the following error:
The method clone() is undefined for the type I
does anybody have any Idea how to get around this issue? the only fix I found is to add to I a new method: (I newI() ) that will clone I. is there a cleaner solution?
thanks.