Replace Parameter with Explicit Methods

From CSSEMediaWiki
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