|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.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()
StateAutomaton this state is part of.
getOwner in interface Statepublic StateImpl getParent()
public Symbol getParentSymbol()
public void setParent(StateImpl parent,
Symbol symbol)
public int getRootDistance()
public List<Symbol> getPathFromRoot()
public boolean isWellDefined()
StateSymbol of the input-Alphabet a transition
exists.
isWellDefined in interface Statepublic Symbol getTransitionOutput(Symbol letter)
State
getTransitionOutput in interface Stateletter - input-symbol
public Symbol[] getInputSymbols()
State
getInputSymbols in interface Statepublic Symbol[] getOutputSymbols()
State
getOutputSymbols in interface Statepublic State getTransitionState(Symbol letter)
State
getTransitionState in interface Stateletter - input-symbol
public State[] getSuccessorStates()
State
getSuccessorStates in interface State
public boolean setTransition(Symbol input,
State newstate,
Symbol output)
State
setTransition in interface Stateinput - input-symbolnewstate - state the transition leads intooutput - output-symbol produced by transition
public boolean setOutput(Symbol output)
State
setOutput in interface Stateoutput - output-symbol of this state
public Symbol getOutput()
State
getOutput in interface Statepublic Alphabet getAlphabet()
State
getAlphabet in interface Statepublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int getId()
StateAutomaton upon
creation of the state. Usually, the initial state will have id 0.
getId in interface Stateprotected void setId(int id)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||