com.karneim.util.collection.set

Class SAutomaton.StatePro

protected class SAutomaton.StatePro extends Object implements IStatePro

Field Summary
protected LinkedListchangeListeners
protected AutomatonSet_String.SStatestate
protected Automaton.IStateChangedListenerstateChangedListener
protected Automaton.IStateVisitedListenerstateVisitedListener
protected LinkedListvisitListeners
Constructor Summary
protected StatePro(AutomatonSet_String.SState state)
Method Summary
voidaddChangeListener(IStatePro.IChangeListener listener)
IStatePro.ITransitionaddTransition(ISet_char charSet, IStatePro toState)
voidaddVisitListener(IStatePro.IVisitListener listener)
protected voidfinalize()
StateProSetgetAllReachableStates()
IStatePro.ITransition[]getAllTransitions()
returns all transitions (normal and epsilon transitions) of this state. the result array contains first all epsilon transitions and then all normal transitions
IStatePro.ITransition[]getETransitions()
intgetStateNumber()
IStatePro.ITransition[]getTransitions()
booleanisFinal()
protected SAutomatonparent()
voidremoveAllTransitions()
booleanremoveChangeListener(IStatePro.IChangeListener listener)
booleanremoveTransition(IStatePro.ITransition transition)
booleanremoveVisitListener(IStatePro.IVisitListener listener)
voidsetFinal(boolean isFinal)
StringtoString()
IStatevisit()

Field Detail

changeListeners

protected LinkedList changeListeners

state

protected final AutomatonSet_String.SState state

stateChangedListener

protected final Automaton.IStateChangedListener stateChangedListener

stateVisitedListener

protected final Automaton.IStateVisitedListener stateVisitedListener

visitListeners

protected LinkedList visitListeners

Constructor Detail

StatePro

protected StatePro(AutomatonSet_String.SState state)

Method Detail

addChangeListener

public void addChangeListener(IStatePro.IChangeListener listener)

addTransition

public IStatePro.ITransition addTransition(ISet_char charSet, IStatePro toState)

addVisitListener

public void addVisitListener(IStatePro.IVisitListener listener)

finalize

protected void finalize()

getAllReachableStates

public StateProSet getAllReachableStates()

getAllTransitions

public IStatePro.ITransition[] getAllTransitions()
returns all transitions (normal and epsilon transitions) of this state. the result array contains first all epsilon transitions and then all normal transitions

getETransitions

public IStatePro.ITransition[] getETransitions()

getStateNumber

public int getStateNumber()

getTransitions

public IStatePro.ITransition[] getTransitions()

isFinal

public boolean isFinal()

parent

protected SAutomaton parent()

removeAllTransitions

public void removeAllTransitions()

removeChangeListener

public boolean removeChangeListener(IStatePro.IChangeListener listener)

removeTransition

public boolean removeTransition(IStatePro.ITransition transition)

removeVisitListener

public boolean removeVisitListener(IStatePro.IVisitListener listener)

setFinal

public void setFinal(boolean isFinal)

toString

public String toString()

visit

public IState visit()