com.karneim.util.collection.automaton
Class Automaton.State
java.lang.Object
com.karneim.util.collection.automaton.Automaton.State
- All Implemented Interfaces:
- Automaton.IState, java.lang.Cloneable
- Direct Known Subclasses:
- AutomatonSet_String.SState
- Enclosing class:
- Automaton
public class Automaton.State
- extends java.lang.Object
- implements Automaton.IState
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
visitedListeners
protected transient java.util.LinkedList visitedListeners
changedListeners
protected transient java.util.LinkedList changedListeners
stateNr
public transient int stateNr
transitions
public Automaton.State.Transition transitions
eTransitions
public Automaton.State.Transition eTransitions
Automaton.State
protected Automaton.State()
addVisitedListener
public void addVisitedListener(Automaton.IStateVisitedListener listener)
removeVisitedListener
public boolean removeVisitedListener(Automaton.IStateVisitedListener listener)
addChangedListener
public void addChangedListener(Automaton.IStateChangedListener listener)
removeChangedListener
public boolean removeChangedListener(Automaton.IStateChangedListener listener)
visit
public final Automaton.IState visit()
unVisit
protected final void unVisit()
parent
protected Automaton parent()
addTransition
protected Automaton.State.Transition addTransition(IProperties properties,
ISet_char charSet,
Automaton.State toState)
addTransition
protected void addTransition(Automaton.State.Transition trans)
removeTransition
protected boolean removeTransition(Automaton.State.Transition transition)
removeAllTransitions
protected void removeAllTransitions()
setDeterministic
protected void setDeterministic(java.lang.Boolean isDeterministic)
isDeterministic
public final boolean isDeterministic()
next
public final Automaton.IState next(char ch)
- Specified by:
next
in interface Automaton.IState
getEClosure
protected Automaton.IState getEClosure()
addEClosure
protected void addEClosure(Automaton.LinkedSet_State eClosure)
getAllReachableStates
public Automaton.LinkedSet_State getAllReachableStates()
- returns all states that are reachable from this states transitions.
Note: this state is only element of the returned array, if it is reachable through one of it's transitions
- Specified by:
getAllReachableStates
in interface Automaton.IState
clone
public final java.lang.Object clone()
- Specified by:
clone
in interface Automaton.IState
- Overrides:
clone
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object