A simple and elegant state machine framework for Java