org.mindswap.pellet.utils.fsm
Class State<T>

java.lang.Object
  extended by org.mindswap.pellet.utils.fsm.State<T>

public class State<T>
extends java.lang.Object

Title:

Description:

Copyright: Copyright (c) 2006

Company: Clark & Parsia, LLC.

Author:
Evren Sirin

Constructor Summary
State()
           
 
Method Summary
 void addTransition(State<T> s)
          Create an epsilon transition from this state to the given state
 void addTransition(T symbol, State<T> s)
          Create a transition from this state to the given state on given symbol
 int getName()
           
 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.
 void setName(int i)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

State

public State()
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.

Returns:
a state reached from this state with the given symbol, null otherwise

getName

public int getName()

setName

public void setName(int i)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2004 Evren Sirin. All Rights Reserved.