Restricted mixed type equals() - in this case we genuinely assume here that ColorPoint of any color is not equal intrinsicly colorless Point even if they have got the same coordinates. However any class extending Point but not adding value component should be equal having the same coordinates. In that sense it is Liskov Substitution Principle compliant.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|