private Set < NFAState < T > > epsilonTransitions ( StateVisitSet < NFAState < T > > marked ) { marked . add ( this ) ; Set < NFAState < T > > set = new HashSet <> ( ) ; for ( NFAState < T > nfa : epsilonTransit ( ) ) { if ( ! marked . contains ( nfa ) ) { set . add ( nfa ) ; set . addAll ( nfa . epsilonTransitions ( marked ) ) ; } } return set ; }
Returns a set of states that can be reached by epsilon transitions .