Skip to content

Latest commit

 

History

History
14 lines (12 loc) · 1.06 KB

README.adoc

File metadata and controls

14 lines (12 loc) · 1.06 KB

DFSM

  • The machine is capable being in a state at any given time.

  • At any state, the machine is capable of accepting an input

  • If an input is acceptable in a state, the result is a new state.

  • If the input is not valid in the context of the current state, exception will be thrown

  • The machine has finite set of discreet states and actions.

  • The machine will always be in a default state.

  • Each states accepts only a discreet number of actions, which is subset of all the possible actions.

Usage:

To make use of the DFSM, you can just copy the class DFSM.java, extend it and write your own state machine, by extending the methods getInitData and getDefaultState. For more help refer the test class, which has an anonymous implementation of DFSM, with 2 states and actions.