|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.karneim.util.collection.set.SAutomaton.StatePro
protected class SAutomaton.StatePro
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.karneim.util.collection.set.IStatePro |
|---|
IStatePro.IChangeListener, IStatePro.ITransition, IStatePro.IVisitListener |
| Field Summary | |
|---|---|
protected java.util.LinkedList |
changeListeners
|
protected AutomatonSet_String.SState |
state
|
protected Automaton.IStateChangedListener |
stateChangedListener
|
protected Automaton.IStateVisitedListener |
stateVisitedListener
|
protected java.util.LinkedList |
visitListeners
|
| Constructor Summary | |
|---|---|
protected |
SAutomaton.StatePro(AutomatonSet_String.SState state)
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
protected SAutomaton.StatePro(AutomatonSet_String.SState state)
| Method Detail |
|---|
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()
isFinal in interface IStatePropublic void setFinal(boolean isFinal)
IStatePro
setFinal in interface IStatePropublic IState visit()
IStatePro
visit in interface IStatePro
public 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 to
public boolean removeTransition(IStatePro.ITransition transition)
IStatePro
removeTransition in interface IStatePropublic void removeAllTransitions()
removeAllTransitions in interface IStatePropublic StateProSet getAllReachableStates()
IStatePro
getAllReachableStates 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||