Package openllet.core.utils.fsm
Class State<T>
- java.lang.Object
-
- openllet.core.utils.fsm.State<T>
-
- Type Parameters:
T- kind of states
public class State<T> extends java.lang.ObjectCopyright: Copyright (c) 2006
Company: Clark & Parsia, LLC.
- Author:
- Evren Sirin
-
-
Constructor Summary
Constructors Constructor Description State()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTransition(State<T> s)Create an epsilon transition from this state to the given statevoidaddTransition(T symbol, State<T> s)Create a transition from this state to the given state on given symbolintgetName()java.util.Set<Transition<T>>getTransitions()Returns the _transitions for originating from this state.State<T>move(T symbol)Returns a state reached from this state with the given symbol.voidsetName(int i)java.lang.StringtoString()
-
-
-
Method Detail
-
addTransition
public void addTransition(T symbol, State<T> s)
Create a transition from this state to the given state on given symbol- Parameters:
symbol-s-
-
addTransition
public void addTransition(State<T> s)
Create an epsilon transition from this state to the given state- Parameters:
s-
-
getTransitions
public java.util.Set<Transition<T>> getTransitions()
Returns the _transitions for originating from this state.- Returns:
- the _transitions for originating from this state
-
move
public State<T> move(T symbol)
Returns a state reached from this state with the given symbol. If more than one state can be reached with the given symbol, an arbitrary one is returned.- Parameters:
symbol-- Returns:
- a state reached from this state with the given symbol,
nullotherwise
-
getName
public int getName()
-
setName
public void setName(int i)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-