A simple state machine library for Java