Perhaps I should have picked a better title, but anyway...
Basically what to do with two or more implementations that have the same public interface, but they are meant for slightly different purposes having a slightly different behavior?
For example let's say a proxy class that uses the same public interface of the original class but with important changes in its behavior.
interface MyTest
{
getSomething() : MySomething;
}
interface MyTestImmutable (extends MyTest ?)
{
// same interface, but in this case the following method
// is supposed to return a clone of the stored MySomething instance
getSomething() : MySomething;
}
Thanks