I am trying to build an NFA with a special purpose of searching, which is totally different from regex. The State has following format
class State implements List{
//GLOBAL DATA
static int depth;
//STATE VALUES
String stateName;
ArrayList<String> label = new ArrayList<>(); //Label for states
//LINKS TO OTHER STATES
boolean
…