How to implement a FSM - Finite State Machine in Java
I have something to do for work and I need your help. We want to implement a FSM - Finite State Machine , to identify char sequence(like: A, B, C, A, C), and tell if it accepted. We think to implement three classes: State , Event and Machine . The state class presents a node in the FSM , we thought to implement it with State design pattern , every node will extend from the abstract class state and every class would handle different types of events and indicate transitions to a new state. Is it good idea in your opinion? Second thing, we don't know how to save all the transitions. Again we