org.eclipse.emf.henshin.statespace
Interface StateSpaceIndex

All Known Subinterfaces:
StateSpaceManager
All Known Implementing Classes:
BasicStateSpaceManager, ParallelStateSpaceManager, ProfilingStateSpaceManager, StateSpaceIndexImpl

public interface StateSpaceIndex

Interface for state space indexes. State spaces indexes are used to store states and to quickly find states based on models.


Method Summary
 void clearCache()
          Clear all caches of the state space index.
 Model getCachedModel(State state)
          Get the cached model that corresponds to a state.
 Model getModel(State state)
          Get the model that corresponds to a state.
 State getState(Model model)
          Get the state that corresponds to the argument model.
 StateSpace getStateSpace()
          Get the indexed state space.
 

Method Detail

getStateSpace

StateSpace getStateSpace()
Get the indexed state space.

Returns:
The state space.

getState

State getState(Model model)
               throws StateSpaceException
Get the state that corresponds to the argument model.

Parameters:
model - State model.
Returns:
The corresponding state or null if none was found.
Throws:
StateSpaceException - If the state space contains errors.

getCachedModel

Model getCachedModel(State state)
                     throws StateSpaceException
Get the cached model that corresponds to a state.

Parameters:
state - State in the state space.
Returns:
The corresponding model or NullPointerException if the model is not cached.
Throws:
StateSpaceException - If the state space contains errors.

getModel

Model getModel(State state)
               throws StateSpaceException
Get the model that corresponds to a state. The model is either cached or will be derived on-the-fly.

Parameters:
state - State in the state space.
Returns:
The corresponding model.
Throws:
StateSpaceException - If the state space contains errors.

clearCache

void clearCache()
Clear all caches of the state space index.