ru.yandex.qatools.fsm.Yatomata Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yatomata Show documentation
Show all versions of yatomata Show documentation
Yet another finite state machine implementation
package ru.yandex.qatools.fsm;
/**
* @author Ilya Sadykov
*/
public interface Yatomata {
/**
* Builder to build the fsm instance
*/
interface Builder {
/**
* Build the fsm with the defined initial state
*/
Yatomata build(Object state);
/**
* Build th fsm with the default initial state
*/
Yatomata build();
}
/**
* Fires new event into the state machine
*/
Object fire(Object event);
/**
* Returns the internal FSM instance
*/
T getFSM();
/**
* Returns the internal FSM class
*/
Class getFSMClass();
/**
* Returns the current state for the FSM
*/
Object getCurrentState();
/**
* Checks if the FSM is already completed
*/
boolean isCompleted();
}