better inheritance

This commit is contained in:
Vyacheslav Boyko 2022-07-11 14:24:53 +03:00
parent 30c372b81a
commit e004e92256

View File

@ -103,10 +103,10 @@ import java.util.function.Supplier;
*/
public class Fsm<T extends Fsm, E> {
private boolean done = false;
private State<E> initialState;
private State<E> currentState;
private State<E> previousState;
protected boolean done = false;
protected State<E> initialState;
protected State<E> currentState;
protected State<E> previousState;
private final Map<String, State<E>> states = new HashMap<>();
private final Map<String, Map<String, Condition<T, E>>> transitions = new HashMap<>();