|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.chaperon.process.PatternAutomaton
This class represents automaton to recognized text pattern.
Field Summary | |
static int |
TYPE_BOL
Begin of line |
static int |
TYPE_EOL
End of line |
static int |
TYPE_EXMATCH
If the characher shouldn't match |
static int |
TYPE_GROUPEND
End of group |
static int |
TYPE_GROUPSTART
Start of group |
static int |
TYPE_MATCH
If the character should match |
static int |
TYPE_MATCHANY
Match all characters |
static int |
TYPE_NOMATCH
A simple transition without matching |
Constructor Summary | |
PatternAutomaton(int statecount)
Create a new pattern automaton. |
Method Summary | |
void |
addTransition(int state,
int nextstate)
Add a state as destination to the transition. |
int |
getFinalState()
Returns the index of the final state |
int |
getFirstState()
Return the first state of the automaton. |
int |
getGroupCount()
Return the count of groups. |
int |
getGroupIndex(int state)
Return the index of a group for a transition. |
char |
getIntervalBegin(int state)
Return the begin of the character interval. |
char |
getIntervalEnd(int state)
Return the end of the character interval. |
int |
getStateCount()
Returns the count of states |
int[] |
getTransitions(int state)
Returns the destinations of the transition. |
int |
getType(int state)
Return the type of transition. |
boolean |
isFinalState(int state)
Test if the state is the final state |
void |
setFinalState(int finalstate)
Set the final state. |
void |
setFirstState(int firststate)
Set the first state of the automaton. |
void |
setGroupCount(int groupcount)
Set the count of groups. |
void |
setGroupIndex(int state,
int groupindex)
Set the group index for a transition. |
void |
setInterval(int state,
char begin,
char end)
Set the character interval, which the processor should matches against. |
void |
setTransitions(int state,
int[] transitions)
Set the destination states for a transition. |
void |
setType(int state,
int type)
Set the of of transition. |
java.lang.String |
toString()
Return a string representation of the automaton. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int TYPE_NOMATCH
public static final int TYPE_MATCH
public static final int TYPE_EXMATCH
public static final int TYPE_MATCHANY
public static final int TYPE_BOL
public static final int TYPE_EOL
public static final int TYPE_GROUPSTART
public static final int TYPE_GROUPEND
Constructor Detail |
public PatternAutomaton(int statecount)
statecount
- Count of states.Method Detail |
public void setType(int state, int type)
state
- Index of state.type
- Type of transition.public int getType(int state)
state
- Index of state.
public void setInterval(int state, char begin, char end)
state
- Index of state.begin
- Begin of the character interval.end
- End of the character interval.public char getIntervalBegin(int state)
state
- Index of state.
public char getIntervalEnd(int state)
state
- Index of state.
public void setGroupIndex(int state, int groupindex)
state
- Index of state.groupindex
- Index of group.public int getGroupIndex(int state)
state
- Index of state.
public void setGroupCount(int groupcount)
groupcount
- Count of groups.public int getGroupCount()
public void setTransitions(int state, int[] transitions)
state
- Index of state.transitions
- Destination states.public int[] getTransitions(int state)
state
- Index of the state
public void addTransition(int state, int nextstate)
state
- Index of transition.nextstate
- Destination state.public void setFirstState(int firststate)
firststate
- First state of the automaton.public int getFirstState()
public void setFinalState(int finalstate)
finalstate
- Final statepublic int getFinalState()
public boolean isFinalState(int state)
state
- Index of the state
public int getStateCount()
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |