es.upv.dsic.gti_ia.cAgents
Class TransitionTable

java.lang.Object
  extended by es.upv.dsic.gti_ia.cAgents.TransitionTable
All Implemented Interfaces:
Cloneable

public class TransitionTable
extends Object
implements Cloneable

This class is used to define all the transitions between the states of a CProcessor's graph

Author:
Ricard Lopez Fogues

Constructor Summary
TransitionTable()
           
 
Method Summary
protected  void addState(String name)
          Adds a state
protected  void addTransition(String from, String destination)
          Adds a transition between from state and destination state
protected  void clear()
          Clears the transition table removing all the transitions
protected  boolean existsTransation(String from, String destination)
          Checks whether the transition exists
 Set<String> getTransitions(String from)
          Returns the set of reachable states from the state
protected  void removeState(String name)
          Removes a state
protected  void removeTransition(String from, String destination)
          Removes a transition between from state and destination state
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransitionTable

public TransitionTable()
Method Detail

clear

protected void clear()
Clears the transition table removing all the transitions


addTransition

protected void addTransition(String from,
                             String destination)
Adds a transition between from state and destination state

Parameters:
from - state
destination - state

removeTransition

protected void removeTransition(String from,
                                String destination)
Removes a transition between from state and destination state

Parameters:
from - state
destination - state

addState

protected void addState(String name)
Adds a state

Parameters:
name - of the state

removeState

protected void removeState(String name)
Removes a state

Parameters:
name - of the state

existsTransation

protected boolean existsTransation(String from,
                                   String destination)
Checks whether the transition exists

Parameters:
from - state
destination - state
Returns:
true if the transition exists, false otherwise

getTransitions

public Set<String> getTransitions(String from)
Returns the set of reachable states from the state

Parameters:
from - state
Returns:
set of reachable states


Copyright © 2012 GTI-IA. All Rights Reserved.