title: Is there a standard pattern for implementing state machines using java?
body: <p>One way i could think about is having a class which listens to events and has the different states stored in variables.</p>
  
  <p>Is there a standard pattern for implementing state machines using java?</p>