public final class NFA extends Object implements StateIndex<NFAState>, JsonConvertible
| Constructor and Description |
|---|
NFA(NFA original)
Creates a deep copy of the
original NFA. |
NFA(RegexAST ast,
NFAState dummyInitialState,
NFAStateTransition[] anchoredEntry,
NFAStateTransition[] unAnchoredEntry,
NFAStateTransition reverseAnchoredEntry,
NFAStateTransition reverseUnAnchoredEntry,
Collection<NFAState> states,
Counter.ThresholdCounter stateIDCounter,
Counter.ThresholdCounter transitionIDCounter,
NFAStateTransition initialLoopBack,
PreCalculatedResultFactory[] preCalculatedResults) |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisEmptypublic NFA(RegexAST ast, NFAState dummyInitialState, NFAStateTransition[] anchoredEntry, NFAStateTransition[] unAnchoredEntry, NFAStateTransition reverseAnchoredEntry, NFAStateTransition reverseUnAnchoredEntry, Collection<NFAState> states, Counter.ThresholdCounter stateIDCounter, Counter.ThresholdCounter transitionIDCounter, NFAStateTransition initialLoopBack, PreCalculatedResultFactory[] preCalculatedResults)
public NFA(NFA original)
original NFA. The copy is deep insofar as the network of
NFAState and NFAStateTransition instances. Any annotations on the states,
transitions or the NFA are shared with the original NFA.public NFAState getUnAnchoredInitialState()
public NFAState getAnchoredInitialState()
public boolean hasReverseUnAnchoredEntry()
public RegexAST getAst()
public NFAState getDummyInitialState()
public boolean isEntry(NFAState state, boolean forward)
public boolean isAnchoredEntry(NFAState state, boolean forward)
public boolean isUnAnchoredEntry(NFAState state, boolean forward)
public int getAnchoredEntryOffset(NFAState state, boolean forward)
public int getUnAnchoredEntryOffset(NFAState state, boolean forward)
public NFAStateTransition[] getAnchoredEntry()
public NFAStateTransition[] getUnAnchoredEntry()
public NFAStateTransition getReverseAnchoredEntry()
public NFAStateTransition getReverseUnAnchoredEntry()
public NFAState[] getStates()
public NFAStateTransition[] getTransitions()
public PreCalculatedResultFactory[] getPreCalculatedResults()
public NFAStateTransition getInitialLoopBackTransition()
public boolean isTraceFinderNFA()
public int getNumberOfStates()
getNumberOfStates in interface StateIndex<NFAState>public int getId(NFAState state)
getId in interface StateIndex<NFAState>public NFAState getState(int id)
getState in interface StateIndex<NFAState>public int getNumberOfTransitions()
public boolean isDead()
public void setInitialLoopBack(boolean enable)
public boolean isFixedCodePointWidth()
public JsonValue toJson()
toJson in interface JsonConvertiblepublic JsonValue toJson(boolean forward)