title: Java State design pattern / "substates"
body: <p>I'm coding in Java and I use the State design pattern like this example: <a href="http://onjavahell.blogspot.fr/2009/05/simple-example-of-state-design-pattern.html" rel="nofollow">http://onjavahell.blogspot.fr/2009/05/simple-example-of-state-design-pattern.html</a></p>
  
  <p>However the UML I've got it's like this:</p>
  
  <pre><code>+---------+        +---------+ 
  | Context |--------|  State  |
  +---------+        +---------+ 
                          |
                 +----------------+
                 |                |
            +---------+       +---------+
            | State 1 |       | State 2 |
            +---------+       +---------+
                 |
         +----------------+
         |                |
    +----------+       +----------+
    | State 1A |       | State 1B |
    +----------+       +----------+
  </code></pre>
  
  <p>I have "sub states". How can code it? Should I make abstract class the <code>State 1</code> or is there any other way? Searching I didn't find any example like this.</p>