ar.edu.unr.fceia.bottallo
Class State

java.lang.Object
  extended by ar.edu.unr.fceia.bottallo.State
All Implemented Interfaces:
java.lang.Cloneable

public class State
extends java.lang.Object
implements java.lang.Cloneable

Represent a Statecharts state


Field Summary
static int COMMON
           
static int COMMON_AND
           
static int COMMON_BASIC
           
static int COMMON_OR
           
static int CONNECTOR
           
static int DIAMOND
           
static int PARAMETRIZED
           
static int PARAMETRIZED_CHILD
           
static int PARAMETRIZED_FATHER
           
static int PARAMETRIZED_FATHER_AND
           
static int PARAMETRIZED_FATHER_OR
           
static int REFERENCE
           
static int RING
           
static int TEMPORIZED
           
static int TEMPORIZED_AND
           
static int TEMPORIZED_BASIC
           
static int TEMPORIZED_OR
           
protected  int type
           
static int UNKNOWN
           
 
Constructor Summary
State()
          Creates a new instance of State
 
Method Summary
protected  void addInTransition(Transition t)
          Add a incomming transition to the state
protected  void addOutTransition(Transition t)
           
protected  void addSubstate(State s)
          Add a substate to the state
 java.lang.Object clone()
           
protected  boolean getActiveSubstate()
          Get information about active substate existence
protected  boolean getBorder()
          Get the border of a state
protected  Transition getDefaultTransition()
          Get the default transition of a state
protected  Diamond_info getDiamondInfo()
          Get the diamond info of a state
protected  Dimension getDimension()
          Get the dimension of the state
protected  State getFather()
          Get the father if the state
protected  boolean getGraphicalStatus()
          Set the graphical status of a state
protected  java.lang.String getId()
          Get the id of a state
protected  java.util.List<Transition> getInTransitions()
          List the incomming transitions of a state
protected  int getLevel()
          Get the level of a state
protected  float getMetric()
          Get the metric of a state
protected  java.lang.String getName()
          Get the name of a state
protected  java.util.List<Transition> getOutTransitions()
          List the outcomming transitions of a state
protected  Param_info getParamInfo()
          Get the parametrized info of a state
protected  java.lang.String getPath()
          Return the path of a state, being S:State, F(S):Father of S
Path = F(S).name - F(F(S)).name - ... - Root_State.name
protected  State getReference()
          Get the reference of a state
protected  java.lang.String getStrType()
          Get the type (human) of a state
protected  java.lang.String getStyle()
          Get the style of a state
protected  java.util.List<State> getSubstates()
          Get the substates of a state
protected  Temp_info getTempInfo()
          Get the temporized info of a state
protected  int getType()
          Get the type of a state
protected  boolean isAndState()
          Return true only if the state is an AND-state
protected  boolean isBasicState()
          Determines if a State is a Basic State (i.e. hasn't substates)
protected  boolean isOrState()
          Return true only if the state is an OR-state
protected  boolean isRootState()
          Determines if a State is a Root State (nobody contains it)
protected  boolean isTemporized()
          Return true only if the state is an temporized state
protected  void removeInTransition(Transition t)
          Remove a incomming transition from the state
protected  void removeOutTransition(Transition t)
           
protected  void removeSubstate(State s)
          Remove a substate from the state
protected  void setActiveSubstate()
          Set this state has an active substate
protected  void setActiveSubstate(boolean b)
          Set true if is an or-state and already has an active substate
protected  void setBorder(boolean b)
          Set the border to a state
protected  void setDefaultTransition(Transition t)
          Set the default transition of a state
protected  void setDiamondInfo(Diamond_info di)
          Set the diamond info to a state
protected  void setDimension(Dimension d)
          Set the dimension of the state
protected  void setFather(State f)
          Set the father of the state
protected  void setGraphicalStatus(boolean b)
          Set the graphical status to a state
protected  void setId(java.lang.String i)
          Set the id of a state
protected  void setLevel(int l)
          Set the level to a state
protected  void setMetric(float m)
          Set the metric to a state
protected  void setName(java.lang.String n)
          Set the name of a state
protected  void setParamInfo(Param_info pi)
          Set the parametrized info to a state
protected  void setReference(State s)
          Set the reference to a state
protected  void setStyle(java.lang.String s)
          Set the style of a state
protected  void setSubstates(java.util.List newSubstates)
          Add a list of substates to the state
protected  void setTempInfo(Temp_info ti)
          Set the temporized info to a state
protected  void setType(int t)
          Set the type to a state
protected  void setVertices()
          Set the vertices to the state
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected int type

UNKNOWN

public static final int UNKNOWN
See Also:
Constant Field Values

REFERENCE

public static final int REFERENCE
See Also:
Constant Field Values

TEMPORIZED

public static final int TEMPORIZED
See Also:
Constant Field Values

TEMPORIZED_BASIC

public static final int TEMPORIZED_BASIC
See Also:
Constant Field Values

TEMPORIZED_OR

public static final int TEMPORIZED_OR
See Also:
Constant Field Values

TEMPORIZED_AND

public static final int TEMPORIZED_AND
See Also:
Constant Field Values

PARAMETRIZED

public static final int PARAMETRIZED
See Also:
Constant Field Values

DIAMOND

public static final int DIAMOND
See Also:
Constant Field Values

RING

public static final int RING
See Also:
Constant Field Values

CONNECTOR

public static final int CONNECTOR
See Also:
Constant Field Values

COMMON

public static final int COMMON
See Also:
Constant Field Values

COMMON_BASIC

public static final int COMMON_BASIC
See Also:
Constant Field Values

COMMON_OR

public static final int COMMON_OR
See Also:
Constant Field Values

COMMON_AND

public static final int COMMON_AND
See Also:
Constant Field Values

PARAMETRIZED_CHILD

public static final int PARAMETRIZED_CHILD
See Also:
Constant Field Values

PARAMETRIZED_FATHER

public static final int PARAMETRIZED_FATHER
See Also:
Constant Field Values

PARAMETRIZED_FATHER_OR

public static final int PARAMETRIZED_FATHER_OR
See Also:
Constant Field Values

PARAMETRIZED_FATHER_AND

public static final int PARAMETRIZED_FATHER_AND
See Also:
Constant Field Values
Constructor Detail

State

public State()
Creates a new instance of State

Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

setName

protected void setName(java.lang.String n)
Set the name of a state


getName

protected java.lang.String getName()
Get the name of a state


setId

protected void setId(java.lang.String i)
Set the id of a state


getId

protected java.lang.String getId()
Get the id of a state


setStyle

protected void setStyle(java.lang.String s)
Set the style of a state


getStyle

protected java.lang.String getStyle()
Get the style of a state


getPath

protected java.lang.String getPath()
Return the path of a state, being S:State, F(S):Father of S
Path = F(S).name - F(F(S)).name - ... - Root_State.name


addInTransition

protected void addInTransition(Transition t)
Add a incomming transition to the state


removeInTransition

protected void removeInTransition(Transition t)
Remove a incomming transition from the state


getInTransitions

protected java.util.List<Transition> getInTransitions()
List the incomming transitions of a state


addOutTransition

protected void addOutTransition(Transition t)

removeOutTransition

protected void removeOutTransition(Transition t)

getOutTransitions

protected java.util.List<Transition> getOutTransitions()
List the outcomming transitions of a state


setDefaultTransition

protected void setDefaultTransition(Transition t)
Set the default transition of a state


getDefaultTransition

protected Transition getDefaultTransition()
Get the default transition of a state


setDimension

protected void setDimension(Dimension d)
Set the dimension of the state


getDimension

protected Dimension getDimension()
Get the dimension of the state


addSubstate

protected void addSubstate(State s)
Add a substate to the state


removeSubstate

protected void removeSubstate(State s)
Remove a substate from the state


setSubstates

protected void setSubstates(java.util.List newSubstates)
Add a list of substates to the state


getSubstates

protected java.util.List<State> getSubstates()
Get the substates of a state


setActiveSubstate

protected void setActiveSubstate(boolean b)
Set true if is an or-state and already has an active substate


setActiveSubstate

protected void setActiveSubstate()
Set this state has an active substate


getActiveSubstate

protected boolean getActiveSubstate()
Get information about active substate existence


setFather

protected void setFather(State f)
Set the father of the state


getFather

protected State getFather()
Get the father if the state


setVertices

protected void setVertices()
Set the vertices to the state


getMetric

protected float getMetric()
Get the metric of a state


setMetric

protected void setMetric(float m)
Set the metric to a state


setLevel

protected void setLevel(int l)
Set the level to a state


getLevel

protected int getLevel()
Get the level of a state


setBorder

protected void setBorder(boolean b)
Set the border to a state


getBorder

protected boolean getBorder()
Get the border of a state


setReference

protected void setReference(State s)
Set the reference to a state


getReference

protected State getReference()
Get the reference of a state


setGraphicalStatus

protected void setGraphicalStatus(boolean b)
Set the graphical status to a state


getGraphicalStatus

protected boolean getGraphicalStatus()
Set the graphical status of a state


isBasicState

protected boolean isBasicState()
Determines if a State is a Basic State (i.e. hasn't substates)

Returns:
true if is a Basic State, false otherwise

isRootState

protected boolean isRootState()
Determines if a State is a Root State (nobody contains it)

Returns:
true if is a Root State, false otherwise

setType

protected void setType(int t)
Set the type to a state


getType

protected int getType()
Get the type of a state


getStrType

protected java.lang.String getStrType()
Get the type (human) of a state


isAndState

protected boolean isAndState()
Return true only if the state is an AND-state


isOrState

protected boolean isOrState()
Return true only if the state is an OR-state


isTemporized

protected boolean isTemporized()
Return true only if the state is an temporized state


setDiamondInfo

protected void setDiamondInfo(Diamond_info di)
Set the diamond info to a state


getDiamondInfo

protected Diamond_info getDiamondInfo()
Get the diamond info of a state


setTempInfo

protected void setTempInfo(Temp_info ti)
Set the temporized info to a state


getTempInfo

protected Temp_info getTempInfo()
Get the temporized info of a state


setParamInfo

protected void setParamInfo(Param_info pi)
Set the parametrized info to a state


getParamInfo

protected Param_info getParamInfo()
Get the parametrized info of a state