Java automata transformer from NDFA to DFA