(This is a follow-up to my previous question.)
I have an interface called Copyable
, which has a single function
Copyable getObjectCopy();
We are in Java 5+ world now! User Generics.
You can change the signature of Copyable
to something like:
interface Copyable<T extends Copyable> {
T getObjectCopy();
}
Now your ValidateValue<L>
value would be something like:
puvlic class ValidateValue<L> implements Copyable<ValidateValue<L>> {
...
}
and everyone (including the compiler) would be happy!