title: State pattern: Why doesn't the context class implement or inherit the State abstract interface/class?
body: <p>I'm reading about the State pattern. I have only just begun, so of course I begin by reading the entire <a href="http://en.wikipedia.org/wiki/State_pattern" rel="nofollow noreferrer">Wikipedia article</a> on it.</p>
  
  <p>I noticed that both of the examples in the article have some base abstract class or Java interface for a generic State's methods/functions. Then there are some states which inherit from the base and implement those methods/functions in different ways. Then there's a Context class which has a private member of type State and which, at any time, can be equal to an instance of one of the implementations. That context class also implements the same methods, and passes them onto the current state instance, and then has an additional method to change the state (or depending on design I understand the change of state could be a reaction to one of the implemented methods).</p>
  
  <p><strong>Why doesn't this context class specifically "extend" or "implement" the generic State base class/interface?</strong></p>