|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.ls5.jlearn.shared.StateImpl
public class StateImpl
Constructor Summary | |
---|---|
protected |
StateImpl(int sigma,
Automaton owner,
int id)
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
Alphabet |
getAlphabet()
Return the complete Alphabet to be considered at this state, including eventual local alphabet symbols. |
int |
getId()
Retrieve the id of this state. |
Symbol[] |
getInputSymbols()
Return all input-symbols for which a transition exists. |
Symbol |
getOutput()
Return output-symbol associated with this state. |
Symbol[] |
getOutputSymbols()
Return all output-symbols connected with existing transitions. |
Automaton |
getOwner()
Return the Automaton this state is part of. |
StateImpl |
getParent()
|
Symbol |
getParentSymbol()
|
List<Symbol> |
getPathFromRoot()
|
int |
getRootDistance()
|
State[] |
getSuccessorStates()
Return all states reached by transitions of this state. |
Symbol |
getTransitionOutput(Symbol letter)
Get output-symbol of the transition triggered by the supplied input-symbol |
State |
getTransitionState(Symbol letter)
Get state the transition triggered by the supplied input-symbol leads to. |
int |
hashCode()
|
boolean |
isWellDefined()
Determine if for every Symbol of the input-Alphabet a transition
exists. |
protected void |
setId(int id)
|
boolean |
setOutput(Symbol output)
Set output-symbol for this state as e.g. used in Moore automata. |
void |
setParent(StateImpl parent,
Symbol symbol)
|
boolean |
setTransition(Symbol input,
State newstate,
Symbol output)
Create a transition for a given input-symbol, leading into the supplied successor state and prodcing the supplied output-symbol. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected StateImpl(int sigma, Automaton owner, int id)
Method Detail |
---|
public Automaton getOwner()
State
Automaton
this state is part of.
getOwner
in interface State
public StateImpl getParent()
public Symbol getParentSymbol()
public void setParent(StateImpl parent, Symbol symbol)
public int getRootDistance()
public List<Symbol> getPathFromRoot()
public boolean isWellDefined()
State
Symbol
of the input-Alphabet
a transition
exists.
isWellDefined
in interface State
public Symbol getTransitionOutput(Symbol letter)
State
getTransitionOutput
in interface State
letter
- input-symbol
public Symbol[] getInputSymbols()
State
getInputSymbols
in interface State
public Symbol[] getOutputSymbols()
State
getOutputSymbols
in interface State
public State getTransitionState(Symbol letter)
State
getTransitionState
in interface State
letter
- input-symbol
public State[] getSuccessorStates()
State
getSuccessorStates
in interface State
public boolean setTransition(Symbol input, State newstate, Symbol output)
State
setTransition
in interface State
input
- input-symbolnewstate
- state the transition leads intooutput
- output-symbol produced by transition
public boolean setOutput(Symbol output)
State
setOutput
in interface State
output
- output-symbol of this state
public Symbol getOutput()
State
getOutput
in interface State
public Alphabet getAlphabet()
State
getAlphabet
in interface State
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public int getId()
State
Automaton
upon
creation of the state. Usually, the initial state will have id 0.
getId
in interface State
protected void setId(int id)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |