Package monq.jfa
Class NfaState<T>
java.lang.Object
monq.jfa.NfaState<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidaddEpsFrom(NfaState<T> other) voidintepsSize()number of epsilon transitions going out from this statebooleanForce this object to have identity.follow(char ch) getTrans()getValue()inthashCode()Force this object to have identity.booleanThis state is relevant for an epsilon closure, if it has non-epsilon transitions or if it has a value.voidvoidSets the transition table.voidtoString()
-
Constructor Details
-
NfaState
public NfaState() -
NfaState
-
-
Method Details
-
isRelevantInEclosure
public boolean isRelevantInEclosure()This state is relevant for an epsilon closure, if it has non-epsilon transitions or if it has a value.
Non-relevant states are kind of non-front states of the graph in an epsilon closure, meaning only epsilon transitions go to other states of the epsilon closure, so if they not even have a value, they carry no relevant information for the epsilon closure for which outgoing character transitions and values are relevant.
-
epsSize
public int epsSize()number of epsilon transitions going out from this state -
removeEps
-
addEps
-
addEps
-
addEpsFrom
-
getTrans
-
setTrans
Sets the transition table.- Parameters:
trans- the transition table, nevernull
-
setValue
-
getValue
-
clearValue
public void clearValue() -
follow
-
toString
-
hashCode
public int hashCode()Force this object to have identity. -
equals
Force this object to have identity. -
charChildren
-
epsChildren
-
allChildren
-