org.eclipse.emf.henshin.statespace.impl
Class StateImpl

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.BasicNotifierImpl
      extended by org.eclipse.emf.ecore.impl.BasicEObjectImpl
          extended by org.eclipse.emf.ecore.impl.MinimalEObjectImpl
              extended by org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container
                  extended by org.eclipse.emf.henshin.statespace.impl.StorageImpl
                      extended by org.eclipse.emf.henshin.statespace.impl.StateImpl
All Implemented Interfaces:
Notifier, EObject, EStructuralFeature.Internal.DynamicValueHolder, InternalEObject, State, Storage

public class StateImpl
extends StorageImpl
implements State

Default implementation of the State interface.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container
MinimalEObjectImpl.Container.Dynamic
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.MinimalEObjectImpl
MinimalEObjectImpl.Container
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
BasicEObjectImpl.EPropertiesHolder, BasicEObjectImpl.EPropertiesHolderBaseImpl, BasicEObjectImpl.EPropertiesHolderImpl
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
BasicNotifierImpl.EAdapterList<E extends Object & Adapter>, BasicNotifierImpl.EObservableAdapterList
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
InternalEObject.EStore
 
Field Summary
protected static int DERIVED_FROM_EDEFAULT
          The default value of the 'Derived From' attribute.
protected static boolean GOAL_EDEFAULT
          The default value of the 'Goal' attribute.
protected static int HASH_CODE_EDEFAULT
          The default value of the 'Hash Code' attribute.
protected  EList<Transition> incoming
          The cached value of the 'Incoming' reference list.
protected  int index
          The cached value of the 'Index' attribute.
protected static int INDEX_EDEFAULT
          The default value of the 'Index' attribute.
protected static int[] LOCATION_EDEFAULT
          The default value of the 'Location' attribute.
protected  Model model
          The cached value of the 'Model' attribute.
protected static int OBJECT_COUNT_EDEFAULT
          The default value of the 'Object Count' attribute.
protected static int[] OBJECT_KEYS_EDEFAULT
          The default value of the 'Object Keys' attribute.
protected static boolean OPEN_EDEFAULT
          The default value of the 'Open' attribute.
protected  EList<Transition> outgoing
          The cached value of the 'Outgoing' containment reference list.
protected static boolean PRUNED_EDEFAULT
          The default value of the 'Pruned' attribute.
 
Fields inherited from class org.eclipse.emf.henshin.statespace.impl.StorageImpl
data, DATA_EDEFAULT, EMPTY_DATA
 
Fields inherited from class org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container
eContainer
 
Fields inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET
 
Fields inherited from interface org.eclipse.emf.henshin.statespace.State
COLOR_DEFAULT, COLOR_INITIAL, COLOR_OPEN, COLOR_PRUNED, COLOR_TERMINAL
 
Fields inherited from interface org.eclipse.emf.ecore.EStructuralFeature.Internal.DynamicValueHolder
NIL
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Constructor Summary
StateImpl()
           
StateImpl(int index)
          Constructor.
 
Method Summary
 NotificationChain basicSetModel(Model newModel, NotificationChain msgs)
           
 NotificationChain basicSetStateSpace(StateSpace newStateSpace, NotificationChain msgs)
           
 NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
           
 Object eGet(int featureID, boolean resolve, boolean coreType)
           
 NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
           
 NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
           
 boolean eIsSet(int featureID)
           
 void eSet(int featureID, Object newValue)
           
protected  EClass eStaticClass()
           
 void eUnset(int featureID)
           
 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()
           
 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.
 boolean isTerminal()
          Check whether this state is terminal.
 void setDerivedFrom(int derivedFrom)
          Sets the value of the 'Derived From' attribute.
 void setGoal(boolean goal)
          Sets the value of the 'Goal' attribute.
 void setHashCode(int hashCode)
          Set the hash code of this state.
 void setIndex(int newIndex)
           
 void setLocation(int... location)
          Sets the location of this state.
 void setModel(Model newModel)
          Set the model for this state.
 void setObjectCount(int objectCount)
          Set the number of objects in this state's model.
 void setObjectKeys(int[] objectKeys)
          Set the object keys for the current state model.
 void setOpen(boolean open)
          Set the open flag.
 void setPruned(boolean pruned)
          Sets the value of the 'Pruned' attribute.
 void setStateSpace(StateSpace newStateSpace)
          Set the state space that contains this state.
 String toString()
           
 
Methods inherited from class org.eclipse.emf.henshin.statespace.impl.StorageImpl
getData, getData, getData, setData, setData, setData, setData
 
Methods inherited from class org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container
eBasicSetContainer, eInternalContainer
 
Methods inherited from class org.eclipse.emf.ecore.impl.MinimalEObjectImpl
dynamicGet, dynamicSet, dynamicUnset, eAdapters, eBasicAdapterArray, eBasicAdapters, eBasicHasAdapters, eBasicProperties, eBasicSetAdapterArray, eBasicSetContainer, eBasicSetContainerFeatureID, eBasicSetSettings, eBasicSettings, eClass, eContainerFeatureID, eContents, eCrossReferences, eDeliver, eDirectResource, eDynamicClass, eHasSettings, eIsProxy, eProperties, eProxyURI, eSetClass, eSetDeliver, eSetDirectResource, eSetProxyURI, eSettings
 
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
eAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainerAdapterArray, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDynamicBasicRemoveFromContainer, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicInvoke, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eInternalResource, eInverseAdd, eInverseRemove, eInvocationDelegate, eInvoke, eInvoke, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetResource, eSetStore, eSetting, eSettingDelegate, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStaticOperationCount, eStore, eUnset, eURIFragmentSegment, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValues
 
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eNotificationRequired, eNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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
 
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequired
 

Field Detail

INDEX_EDEFAULT

protected static final int INDEX_EDEFAULT
The default value of the 'Index' attribute.

See Also:
getIndex(), Constant Field Values

index

protected int index
The cached value of the 'Index' attribute.

See Also:
getIndex()

incoming

protected EList<Transition> incoming
The cached value of the 'Incoming' reference list.

See Also:
getIncoming()

outgoing

protected EList<Transition> outgoing
The cached value of the 'Outgoing' containment reference list.

See Also:
getOutgoing()

HASH_CODE_EDEFAULT

protected static final int HASH_CODE_EDEFAULT
The default value of the 'Hash Code' attribute.

See Also:
getHashCode(), Constant Field Values

DERIVED_FROM_EDEFAULT

protected static final int DERIVED_FROM_EDEFAULT
The default value of the 'Derived From' attribute.

See Also:
getDerivedFrom(), Constant Field Values

OPEN_EDEFAULT

protected static final boolean OPEN_EDEFAULT
The default value of the 'Open' attribute.

See Also:
isOpen(), Constant Field Values

GOAL_EDEFAULT

protected static final boolean GOAL_EDEFAULT
The default value of the 'Goal' attribute.

See Also:
isGoal(), Constant Field Values

PRUNED_EDEFAULT

protected static final boolean PRUNED_EDEFAULT
The default value of the 'Pruned' attribute.

See Also:
isPruned(), Constant Field Values

LOCATION_EDEFAULT

protected static final int[] LOCATION_EDEFAULT
The default value of the 'Location' attribute.

See Also:
getLocation()

OBJECT_COUNT_EDEFAULT

protected static final int OBJECT_COUNT_EDEFAULT
The default value of the 'Object Count' attribute.

See Also:
getObjectCount(), Constant Field Values

OBJECT_KEYS_EDEFAULT

protected static final int[] OBJECT_KEYS_EDEFAULT
The default value of the 'Object Keys' attribute.

See Also:
getObjectKeys()

model

protected Model model
The cached value of the 'Model' attribute.

See Also:
getModel()
Constructor Detail

StateImpl

public StateImpl(int index)
Constructor.

Parameters:
index - The index of this state.

StateImpl

public StateImpl()
Method Detail

isInitial

public boolean isInitial()
Check whether this state is an initial one.

Specified by:
isInitial in interface State

isTerminal

public boolean isTerminal()
Check whether this state is terminal.


getOutgoing

public Transition getOutgoing(State target,
                              Rule rule,
                              int match,
                              int[] paramIDs)
Description copied from interface: State

Specified by:
getOutgoing in interface State

getHashCode

public int getHashCode()
Description copied from interface: State
Get the hash code of this state.

Specified by:
getHashCode in interface State
Returns:
the hash code.
See Also:
State.setHashCode(int)

setHashCode

public void setHashCode(int hashCode)
Description copied from interface: State
Set the hash code of this state.

Specified by:
setHashCode in interface State
See Also:
State.getHashCode()

getDerivedFrom

public int getDerivedFrom()
Description copied from interface: State
Returns the value of the 'Derived From' attribute.

Specified by:
getDerivedFrom in interface State
Returns:
the value of the 'Derived From' attribute.
See Also:
State.setDerivedFrom(int), StateSpacePackage.getState_DerivedFrom()

setDerivedFrom

public void setDerivedFrom(int derivedFrom)
Description copied from interface: State
Sets the value of the 'Derived From' attribute.

Specified by:
setDerivedFrom in interface State
Parameters:
derivedFrom - the new value of the 'Derived From' attribute.
See Also:
State.getDerivedFrom()

isOpen

public boolean isOpen()
Description copied from interface: State
Check whether this state is open.

Specified by:
isOpen in interface State
Returns:
true if it is open.
See Also:
State.setOpen(boolean)

setOpen

public void setOpen(boolean open)
Description copied from interface: State
Set the open flag.

Specified by:
setOpen in interface State
Parameters:
open - the new value of the open flag.
See Also:
State.isOpen()

isGoal

public boolean isGoal()
Description copied from interface: State
Returns the value of the 'Goal' attribute. The default value is "false".

Specified by:
isGoal in interface State
Returns:
the value of the 'Goal' attribute.
See Also:
State.setGoal(boolean), StateSpacePackage.getState_Goal()

setGoal

public void setGoal(boolean goal)
Description copied from interface: State
Sets the value of the 'Goal' attribute.

Specified by:
setGoal in interface State
Parameters:
goal - the new value of the 'Goal' attribute.
See Also:
State.isGoal()

isPruned

public boolean isPruned()
Description copied from interface: State
Returns the value of the 'Pruned' attribute. The default value is "false".

Specified by:
isPruned in interface State
Returns:
the value of the 'Pruned' attribute.
See Also:
State.setPruned(boolean), StateSpacePackage.getState_Pruned()

setPruned

public void setPruned(boolean pruned)
Description copied from interface: State
Sets the value of the 'Pruned' attribute.

Specified by:
setPruned in interface State
Parameters:
pruned - the new value of the 'Pruned' attribute.
See Also:
State.isPruned()

getObjectCount

public int getObjectCount()
Description copied from interface: State
Get the number of nodes in this state's model.

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

setObjectCount

public void setObjectCount(int objectCount)
Description copied from interface: State
Set the number of objects in this state's model.

Specified by:
setObjectCount in interface State
See Also:
State.getObjectCount()

getLocation

public int[] getLocation()
Description copied from interface: State
Get the location of this state. This always returns an integer array of size 3 (X,Y and Z coordinate).

Specified by:
getLocation in interface State
Returns:
the location of this state.
See Also:
State.setLocation(int[])

setLocation

public void setLocation(int... location)
Description copied from interface: State
Sets the location of this state. The argument must have length 3.

Specified by:
setLocation in interface State
See Also:
State.getLocation()

getObjectKeys

public int[] getObjectKeys()
Description copied from interface: State
Get the object keys for the current state model.

Specified by:
getObjectKeys in interface State
Returns:
the value of the 'Object Keys' attribute.

setObjectKeys

public void setObjectKeys(int[] objectKeys)
Description copied from interface: State
Set the object keys for the current state model.

Specified by:
setObjectKeys in interface State
See Also:
State.getObjectKeys()

toString

public String toString()
Overrides:
toString in class StorageImpl

eStaticClass

protected EClass eStaticClass()
Overrides:
eStaticClass in class StorageImpl

getIndex

public int getIndex()

Specified by:
getIndex in interface State
Returns:
the index of this state.
See Also:
State.setIndex(int), StateSpacePackage.getState_Index()

setIndex

public void setIndex(int newIndex)

Specified by:
setIndex in interface State
Parameters:
newIndex - the new index.
See Also:
State.getIndex()

getIncoming

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

Specified by:
getIncoming in interface State
Returns:
list of incoming transitions.
See Also:
Transition.getTarget()

getOutgoing

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

Specified by:
getOutgoing in interface State
Returns:
the outgoing transitions.
See Also:
Transition.getSource()

getModel

public Model getModel()
Description copied from interface: State
Get the associated model of this state.

Specified by:
getModel in interface State
Returns:
the associated model.
See Also:
#setModel(Resource)

basicSetModel

public NotificationChain basicSetModel(Model newModel,
                                       NotificationChain msgs)

setModel

public void setModel(Model newModel)
Description copied from interface: State
Set the model for this state.

Specified by:
setModel in interface State
Parameters:
newModel - the new value of the 'Model' containment reference.
See Also:
State.getModel()

getStateSpace

public StateSpace getStateSpace()
Description copied from interface: State
Get the state space that contains this state.

Specified by:
getStateSpace in interface State
Returns:
the state space that contains this state.
See Also:
State.setStateSpace(StateSpace)

basicSetStateSpace

public NotificationChain basicSetStateSpace(StateSpace newStateSpace,
                                            NotificationChain msgs)

setStateSpace

public void setStateSpace(StateSpace newStateSpace)
Description copied from interface: State
Set the state space that contains this state.

Specified by:
setStateSpace in interface State
See Also:
State.getStateSpace()

eInverseAdd

public NotificationChain eInverseAdd(InternalEObject otherEnd,
                                     int featureID,
                                     NotificationChain msgs)
Overrides:
eInverseAdd in class BasicEObjectImpl

eInverseRemove

public NotificationChain eInverseRemove(InternalEObject otherEnd,
                                        int featureID,
                                        NotificationChain msgs)
Overrides:
eInverseRemove in class BasicEObjectImpl

eBasicRemoveFromContainerFeature

public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
Overrides:
eBasicRemoveFromContainerFeature in class BasicEObjectImpl

eGet

public Object eGet(int featureID,
                   boolean resolve,
                   boolean coreType)
Specified by:
eGet in interface InternalEObject
Overrides:
eGet in class StorageImpl

eSet

public void eSet(int featureID,
                 Object newValue)
Specified by:
eSet in interface InternalEObject
Overrides:
eSet in class StorageImpl

eUnset

public void eUnset(int featureID)
Specified by:
eUnset in interface InternalEObject
Overrides:
eUnset in class StorageImpl

eIsSet

public boolean eIsSet(int featureID)
Specified by:
eIsSet in interface InternalEObject
Overrides:
eIsSet in class StorageImpl