Simple Finite state machine implemented in Java which can be extended to suit needs of user.