Empty method over-rides
From CSSEMediaWiki
(Difference between revisions)
(New page: Empty method overrides occur when some part of an interface is not relevant to some specific implementation. This can occur when implementing interfaces or inheriting from some class. In...) |
|||
Line 2: | Line 2: | ||
== Example == | == Example == | ||
+ | |||
+ | [[Image:Empty-method-override.png]] |
Revision as of 04:10, 1 August 2009
Empty method overrides occur when some part of an interface is not relevant to some specific implementation. This can occur when implementing interfaces or inheriting from some class. In this situation it is tempting to override the method with an empty implementation which does nothing. Often the goal is to maintain polymorphism despite the fact that it would seem the interface doesn't fit well.