Compare commits
5 Commits
92a75db1b4
...
efa3f8616b
Author | SHA1 | Date |
---|---|---|
Vyacheslav Boyko | efa3f8616b | |
Vyacheslav Boyko | fe5d5a2502 | |
Vyacheslav Boyko | 9db96a2b37 | |
Vyacheslav Boyko | 4712c1b423 | |
Vyacheslav Boyko | 1297474ef5 |
2
pom.xml
2
pom.xml
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
<groupId>me.bvn13.fsm</groupId>
|
<groupId>me.bvn13.fsm</groupId>
|
||||||
<artifactId>fsm</artifactId>
|
<artifactId>fsm</artifactId>
|
||||||
<version>2.1.8</version>
|
<version>2.1.9</version>
|
||||||
|
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
|
@ -149,9 +149,9 @@ public class Fsm<T extends Fsm, E> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
currentState.process(event);
|
currentState.process(event);
|
||||||
currentState.afterEvent();
|
|
||||||
if (currentState.isFinish()) {
|
if (currentState.isFinish()) {
|
||||||
done = true;
|
done = true;
|
||||||
|
currentState.afterEvent();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switchToNextState(event);
|
switchToNextState(event);
|
||||||
|
@ -278,6 +278,7 @@ public class Fsm<T extends Fsm, E> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void nextState(State<E> state, E event) {
|
private void nextState(State<E> state, E event) {
|
||||||
|
currentState.afterEvent();
|
||||||
previousState = currentState;
|
previousState = currentState;
|
||||||
currentState = state;
|
currentState = state;
|
||||||
currentState.beforeEvent();
|
currentState.beforeEvent();
|
||||||
|
|
Loading…
Reference in New Issue