org.eclipse.emf.henshin.statespace
Interface State

All Superinterfaces:
EObject, Notifier, Storage
All Known Implementing Classes:
StateImpl

public interface State
extends Storage

Interface for states.


Field Summary
static int[] COLOR_DEFAULT
          Color for normal states (RGB).
static int[] COLOR_INITIAL
          Color for initial states (RGB).
static int[] COLOR_OPEN
          Color for open states (RGB).
static int[] COLOR_PRUNED
          Color for pruned states (RGB).
static int[] COLOR_TERMINAL
          Color for terminal states (RGB).
 
Method Summary
 int getDerivedFrom()
          Returns the value of the 'Derived From' attribute.
 int getHashCode()
          Get the hash code of this state.
 EList<Transition> getIncoming()
          Get the list of incoming transitions of this state.
 int getIndex()
          Get the index of this state.
 int[] getLocation()
          Get the location of this state.
 Model getModel()
          Get the associated model of this state.
 int getObjectCount()
          Get the number of nodes in this state's model.
 int[] getObjectKeys()
          Get the object keys for the current state model.
 EList<Transition> getOutgoing()
          Get the list of outgoing transitions of this state.
 Transition getOutgoing(State target, Rule rule, int match, int[] paramIDs)
           
 StateSpace getStateSpace()
          Get the state space that contains this state.
 boolean isGoal()
          Returns the value of the 'Goal' attribute.
 boolean isInitial()
          Check whether this state is an initial one.
 boolean isOpen()
          Check whether this state is open.
 boolean isPruned()
          Returns the value of the 'Pruned' attribute.
 void setDerivedFrom(int value)
          Sets the value of the 'Derived From' attribute.
 void setGoal(boolean value)
          Sets the value of the 'Goal' attribute.
 void setHashCode(int value)
          Set the hash code of this state.
 void setIndex(int value)
          Set the index of this state.
 void setLocation(int... location)
          Sets the location of this state.
 void setModel(Model value)
          Set the model for this state.
 void setObjectCount(int value)
          Set the number of objects in this state's model.
 void setObjectKeys(int[] value)
          Set the object keys for the current state model.
 void setOpen(boolean value)
          Set the open flag.
 void setPruned(boolean value)
          Sets the value of the 'Pruned' attribute.
 void setStateSpace(StateSpace value)
          Set the state space that contains this state.
 
Methods inherited from interface org.eclipse.emf.henshin.statespace.Storage
getData, getData, getData, setData, setData, setData, setData
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Field Detail

COLOR_DEFAULT

static final int[] COLOR_DEFAULT
Color for normal states (RGB).


COLOR_INITIAL

static final int[] COLOR_INITIAL
Color for initial states (RGB).


COLOR_TERMINAL

static final int[] COLOR_TERMINAL
Color for terminal states (RGB).


COLOR_OPEN

static final int[] COLOR_OPEN
Color for open states (RGB).


COLOR_PRUNED

static final int[] COLOR_PRUNED
Color for pruned states (RGB).

Method Detail

getIndex

int getIndex()
Get the index of this state.

Returns:
the index of this state.
See Also:
setIndex(int), StateSpacePackage.getState_Index()

setIndex

void setIndex(int value)
Set the index of this state. Should be done only by StateSpaceManagers.

Parameters:
value - the new index.
See Also:
getIndex()

getDerivedFrom

int getDerivedFrom()
Returns the value of the 'Derived From' attribute.

Returns:
the value of the 'Derived From' attribute.
See Also:
setDerivedFrom(int), StateSpacePackage.getState_DerivedFrom()

setDerivedFrom

void setDerivedFrom(int value)
Sets the value of the 'Derived From' attribute.

Parameters:
value - the new value of the 'Derived From' attribute.
See Also:
getDerivedFrom()

getIncoming

EList<Transition> getIncoming()
Get the list of incoming transitions of this state.

Returns:
list of incoming transitions.
See Also:
Transition.getTarget()

getOutgoing

EList<Transition> getOutgoing()
Get the list of outgoing transitions of this state.

Returns:
the outgoing transitions.
See Also:
Transition.getSource()

getModel

Model getModel()
Get the associated model of this state.

Returns:
the associated model.
See Also:
#setModel(Resource)

setModel

void setModel(Model value)
Set the model for this state.

Parameters:
value - the new value of the 'Model' containment reference.
See Also:
getModel()

getStateSpace

StateSpace getStateSpace()
Get the state space that contains this state.

Returns:
the state space that contains this state.
See Also:
setStateSpace(StateSpace)

setStateSpace

void setStateSpace(StateSpace value)
Set the state space that contains this state.

Parameters:
stateSpace - the container state space.
See Also:
getStateSpace()

getLocation

int[] getLocation()
Get the location of this state. This always returns an integer array of size 3 (X,Y and Z coordinate).

Returns:
the location of this state.
See Also:
setLocation(int[])

setLocation

void setLocation(int... location)
Sets the location of this state. The argument must have length 3.

Parameters:
the - new location of the state.
See Also:
getLocation()

isOpen

boolean isOpen()
Check whether this state is open.

Returns:
true if it is open.
See Also:
setOpen(boolean)

setOpen

void setOpen(boolean value)
Set the open flag.

Parameters:
value - the new value of the open flag.
See Also:
isOpen()

isGoal

boolean isGoal()
Returns the value of the 'Goal' attribute. The default value is "false".

Returns:
the value of the 'Goal' attribute.
See Also:
setGoal(boolean), StateSpacePackage.getState_Goal()

setGoal

void setGoal(boolean value)
Sets the value of the 'Goal' attribute.

Parameters:
value - the new value of the 'Goal' attribute.
See Also:
isGoal()

isPruned

boolean isPruned()
Returns the value of the 'Pruned' attribute. The default value is "false".

Returns:
the value of the 'Pruned' attribute.
See Also:
setPruned(boolean), StateSpacePackage.getState_Pruned()

setPruned

void setPruned(boolean value)
Sets the value of the 'Pruned' attribute.

Parameters:
value - the new value of the 'Pruned' attribute.
See Also:
isPruned()

getHashCode

int getHashCode()
Get the hash code of this state.

Returns:
the hash code.
See Also:
setHashCode(int)

setHashCode

void setHashCode(int value)
Set the hash code of this state.

Parameters:
hashCode - the hash code.
See Also:
getHashCode()

getObjectCount

int getObjectCount()
Get the number of nodes in this state's model.

Returns:
the value of the 'Node Count' attribute.
See Also:
setObjectCount(int), org.eclipse.emf.henshin.statespace.StateSpacePackage#getState_NodeCount()

setObjectCount

void setObjectCount(int value)
Set the number of objects in this state's model.

Parameters:
objectCount - the new value of the 'Object Count' attribute.
See Also:
getObjectCount()

getObjectKeys

int[] getObjectKeys()
Get the object keys for the current state model.

Returns:
the value of the 'Object Keys' attribute.

setObjectKeys

void setObjectKeys(int[] value)
Set the object keys for the current state model.

Parameters:
objectKeys - the new value of the 'Object Keys' attribute.
See Also:
getObjectKeys()

isInitial

boolean isInitial()
Check whether this state is an initial one. A state is initial if getModel() returns a resource with a non-null URI.


getOutgoing

Transition getOutgoing(State target,
                       Rule rule,
                       int match,
                       int[] paramIDs)