Replace Parameter with Explicit Methods

From CSSEMediaWiki
Revision as of 12:29, 26 September 2009 by AlexGee (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is used when you have a method which switches it's functionality based on a passed in parameter.


  • Create a new method for each case
  • Replace all calls to the old method with a call to the relevant new one
  • Delete the old method


Personal tools