FSM4J - A hierarchical finite state machine for Java