public abstract class DfaState<MATCHRESULT>
extends java.lang.Object
Constructor and Description |
---|
DfaState() |
Modifier and Type | Method and Description |
---|---|
abstract void |
enumerateTransitions(DfaTransitionConsumer<MATCHRESULT> consumer)
Enumerate all the transitions out of this state
|
abstract MATCHRESULT |
getMatch()
Get the result that has been matched if we've transitioned into this state
|
abstract DfaState<MATCHRESULT> |
getNextState(char c)
Process a character and get the next state
|
abstract int |
getStateNumber()
Get the state number.
|
abstract java.lang.Iterable<DfaState<MATCHRESULT>> |
getSuccessorStates()
Get an
Iterable of all the successor states of this state. |
public abstract DfaState<MATCHRESULT> getNextState(char c)
c
- input characterpublic abstract MATCHRESULT getMatch()
public abstract int getStateNumber()
DfaBuilder
build method will be compactly numbered starting at 0.
These state numbers can be used to maintain auxiliary information about a DFA.
public abstract void enumerateTransitions(DfaTransitionConsumer<MATCHRESULT> consumer)
consumer
- each DFA transition will be sent herepublic abstract java.lang.Iterable<DfaState<MATCHRESULT>> getSuccessorStates()
Iterable
of all the successor states of this state.
Note that the same successor state may appear more than once in the interation