protected class SAutomaton.StatePro extends java.lang.Object implements IStatePro
IStatePro.IChangeListener, IStatePro.ITransition, IStatePro.IVisitListener| Modifier and Type | Field and Description |
|---|---|
protected java.util.LinkedList |
changeListeners |
protected AutomatonSet_String.SState |
state |
protected Automaton.IStateChangedListener |
stateChangedListener |
protected Automaton.IStateVisitedListener |
stateVisitedListener |
protected java.util.LinkedList |
visitListeners |
| Modifier | Constructor and Description |
|---|---|
protected |
StatePro(AutomatonSet_String.SState state) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(IStatePro.IChangeListener listener) |
IStatePro.ITransition |
addTransition(ISet_char charSet,
IStatePro toState)
Adds a new transition to this state.
|
void |
addVisitListener(IStatePro.IVisitListener listener) |
protected void |
finalize() |
StateProSet |
getAllReachableStates()
Returns all states that are reachable from this state through it's transitions and so on.
|
IStatePro.ITransition[] |
getAllTransitions()
returns all transitions (normal and epsilon transitions) of this state.
|
IStatePro.ITransition[] |
getETransitions() |
int |
getStateNumber() |
IStatePro.ITransition[] |
getTransitions() |
boolean |
isFinal() |
protected SAutomaton |
parent() |
void |
removeAllTransitions() |
boolean |
removeChangeListener(IStatePro.IChangeListener listener) |
boolean |
removeTransition(IStatePro.ITransition transition)
Removes the specified transition from this state.
|
boolean |
removeVisitListener(IStatePro.IVisitListener listener) |
void |
setFinal(boolean isFinal)
Makes this state final or non final.
|
java.lang.String |
toString() |
IState |
visit()
Visits this state with an epsilon transition and returns its epsilon closure.
|
protected final Automaton.IStateVisitedListener stateVisitedListener
protected final Automaton.IStateChangedListener stateChangedListener
protected java.util.LinkedList visitListeners
protected java.util.LinkedList changeListeners
protected final AutomatonSet_String.SState state
protected StatePro(AutomatonSet_String.SState state)
public void addVisitListener(IStatePro.IVisitListener listener)
addVisitListener in interface IStatePropublic boolean removeVisitListener(IStatePro.IVisitListener listener)
removeVisitListener in interface IStatePropublic void addChangeListener(IStatePro.IChangeListener listener)
addChangeListener in interface IStatePropublic boolean removeChangeListener(IStatePro.IChangeListener listener)
removeChangeListener in interface IStateProprotected void finalize()
finalize in class java.lang.Objectprotected SAutomaton parent()
public boolean isFinal()
public void setFinal(boolean isFinal)
IStatePropublic IState visit()
IStatePropublic IStatePro.ITransition addTransition(ISet_char charSet, IStatePro toState)
IStateProcharSet and it's destionation
state toState, so that you can transit from this state to the destination state
only with a character contained in charSet. There is only one exception,
if charSet is null, an epsilon transition will be added, which means that there
are no chars needed to get to the destinationState toState; in other words a
state that has an epsilon transition can get through this epsilon transition to the destination
state toState without any char, so that we can say that toState melts
into the state.addTransition in interface IStateProcharSet - the characters for this transitiontoState - the destination state where to transit topublic boolean removeTransition(IStatePro.ITransition transition)
IStateProremoveTransition in interface IStatePropublic void removeAllTransitions()
removeAllTransitions in interface IStatePropublic StateProSet getAllReachableStates()
IStateProgetAllReachableStates in interface IStatePropublic IStatePro.ITransition[] getTransitions()
getTransitions in interface IStatePropublic IStatePro.ITransition[] getETransitions()
getETransitions in interface IStatePropublic IStatePro.ITransition[] getAllTransitions()
getAllTransitions in interface IStatePropublic int getStateNumber()
getStateNumber in interface IStatePropublic java.lang.String toString()
toString in class java.lang.Object