public interface Matchable
extends java.io.Serializable
DfaBuilder
to specify a set of strings to match.
The primary implementation classes are Pattern
and CharRange
.
Modifier and Type | Method and Description |
---|---|
int |
addToNFA(Nfa<?> nfa,
int targetState)
Add states to an NFA to match the desired pattern
|
Matchable |
getReversed()
Get the reverse of this pattern
|
boolean |
isUnbounded() |
boolean |
matchesEmpty() |
boolean |
matchesNonEmpty() |
boolean |
matchesSomething() |
int addToNFA(Nfa<?> nfa, int targetState)
New states will be created in the NFA to match the pattern and transition to the given targetState.
NO NEW TRANSITIONS will be added to the target state or any other pre-existing state
nfa
- nfa to add totargetState
- target state after the pattern is matchedboolean matchesEmpty()
boolean matchesNonEmpty()
boolean matchesSomething()
boolean isUnbounded()
Matchable getReversed()
The reverse of a pattern matches the reverse of all the strings that this pattern matches