From aa6b58959109f908f3fadef17ee93277637d3058 Mon Sep 17 00:00:00 2001
From: Vyacheslav Boyko
* Final State Machine
*
* Each state machine must be prepared with:
*
@@ -25,7 +26,6 @@ import java.util.function.Supplier;
*
- *
* 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(); - * } - *