public class NFAState extends Object implements IndexedState, JsonConvertible
| Constructor and Description |
|---|
NFAState(short id,
ASTNodeSet<? extends RegexASTNode> stateSet,
CharSet matcherBuilder,
Set<LookBehindAssertion> finishedLookBehinds,
boolean hasPrefixStates) |
public NFAState(short id,
ASTNodeSet<? extends RegexASTNode> stateSet,
CharSet matcherBuilder,
Set<LookBehindAssertion> finishedLookBehinds,
boolean hasPrefixStates)
public NFAState createTraceFinderCopy(short copyID)
public CharSet getCharSet()
public Set<LookBehindAssertion> getFinishedLookBehinds()
public ASTNodeSet<? extends RegexASTNode> getStateSet()
public boolean hasPrefixStates()
public void setHasPrefixStates(boolean value)
public boolean isFinalState(boolean forward)
public boolean isAnchoredFinalState(boolean forward)
public boolean isUnAnchoredFinalState(boolean forward)
public boolean isForwardFinalState()
public boolean isForwardAnchoredFinalState()
public void setForwardAnchoredFinalState(boolean value)
public boolean isForwardUnAnchoredFinalState()
public void setForwardUnAnchoredFinalState(boolean value)
public boolean isReverseFinalState()
public boolean isReverseAnchoredFinalState()
public void setReverseAnchoredFinalState(boolean value)
public boolean isReverseUnAnchoredFinalState()
public void setReverseUnAnchoredFinalState(boolean value)
public boolean hasTransitionToAnchoredFinalState(boolean forward)
public short getTransitionToAnchoredFinalStateId(boolean forward)
public NFAStateTransition getTransitionToAnchoredFinalState(boolean forward)
public boolean hasTransitionToUnAnchoredFinalState(boolean forward)
public NFAStateTransition getTransitionToUnAnchoredFinalState(boolean forward)
public short getTransitionToUnAnchoredFinalStateId(boolean forward)
public boolean hasTransitionToFinalState(boolean forward)
public int getFirstTransitionToFinalStateIndex(boolean forward)
public NFAStateTransition getFirstTransitionToFinalState(boolean forward)
public NFAStateTransition[] getNext()
public NFAStateTransition[] getNext(boolean forward)
public void addLoopBackNext(NFAStateTransition transition)
public void removeLoopBackNext()
public void setNext(NFAStateTransition[] transitions, boolean createReverseTransitions)
public void removeNext(NFAState state)
public void linkPrev()
public void setPrev(NFAStateTransition[] transitions)
public NFAStateTransition[] getPrev()
public NFAStateTransition[] getPrev(boolean forward)
public short getId()
getId in interface IndexedStatepublic List<Integer> getPossibleResults()
NFATraceFinderGenerator. This set must be sorted, since the index values indicate the
priority of their respective pre-calculated results. Example: /(a)|([ab])/ will yield two
possible results, where the one corresponding to capture group 1 will have the higher
priority, so when a single 'a' is encountered when searching for a match, the pre-calculated
result corresponding to capture group 1 must be preferred.public boolean hasPossibleResults()
public void addPossibleResult(int index)
public boolean isDead(boolean forward)
public String idToString()
public JsonObject toJson()
toJson in interface JsonConvertiblepublic JsonObject toJson(boolean forward)