(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 getObjectCopy();
}
Now your ValidateValue
value would be something like:
puvlic class ValidateValue implements Copyable> {
...
}
and everyone (including the compiler) would be happy!