diff --git a/src/main/java/me/bvn13/fsm/Fsm.java b/src/main/java/me/bvn13/fsm/Fsm.java index e2664cc..604d38e 100644 --- a/src/main/java/me/bvn13/fsm/Fsm.java +++ b/src/main/java/me/bvn13/fsm/Fsm.java @@ -17,6 +17,7 @@ import java.util.function.Supplier; *
* Final State Machine *
+ * ** Each state machine must be prepared with: *
* Each {@link State} may be specified with handlers: @@ -34,7 +34,6 @@ import java.util.function.Supplier; *
* Transition is the Rule providing FSM the possibility to change between states. @@ -46,12 +45,10 @@ import java.util.function.Supplier; *
* Simple way to use it - to construct an inherited class specified with the type of events to be processed * during transitions. - *
* ** {@code @@ -79,35 +76,29 @@ import java.util.function.Supplier; * ** {@link SimpleFsm} */ public class Fsm* Otherwise you are able to use Old syntax: - *
* *- * {@code * NamedFsm namedFsm = new NamedFsm().setName("TEST FSM"); - * namedFsm.initState(new State* + *("init") { - * @Override + * namedFsm.initState(new State<String>("init") { * public void process(String event) { * initStatedProcessed.set(true); * } * }); * - * namedFsm.addTransition("init", new State ("first", true) { - * @Override + * namedFsm.addTransition("init", new State<String>("first", true) { * public void process(String event) { * firstStatedProcessed.set(true); * } * }); * - * namedFsm.addTransition("init", new State ("another", true) { - * @Override + * namedFsm.addTransition("init", new State<String>("another", true) { * public void process(String event) { * anotherStatedProcessed.set(true); * } - * }, (fsm, event) -> false); + * }, (fsm, event) -> false); * * namedFsm.init(); - * } - *