|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.henshin.statespace.impl.StateSpaceIndexImpl
public class StateSpaceIndexImpl
Default implementation of StateSpaceIndex
.
Constructor Summary | |
---|---|
StateSpaceIndexImpl(StateSpace stateSpace)
Default constructor. |
Method Summary | |
---|---|
protected void |
addToCache(State state,
Model model)
|
void |
addToIndex(State state)
Add a state to the index. |
void |
clearCache()
Clear all caches of the state space index. |
protected Model |
deriveModel(State state,
boolean fromInitial)
|
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. |
protected State |
getState(Model model,
int hash)
Get the state for a given model and its hash code. |
StateSpace |
getStateSpace()
Get the indexed state space. |
void |
removeFromIndex(State state)
Remove a state from the index. |
void |
resetIndex()
Reset this state space index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StateSpaceIndexImpl(StateSpace stateSpace)
Method Detail |
---|
public Model getModel(State state) throws StateSpaceException
StateSpaceIndex
getModel
in interface StateSpaceIndex
state
- State in the state space.
StateSpaceException
- If the state space contains errors.public Model getCachedModel(State state)
StateSpaceIndex
getCachedModel
in interface StateSpaceIndex
state
- State in the state space.
NullPointerException
if the model is not cached.protected void addToCache(State state, Model model) throws StateSpaceException
StateSpaceException
protected Model deriveModel(State state, boolean fromInitial) throws StateSpaceException
StateSpaceException
public final State getState(Model model) throws StateSpaceException
StateSpaceIndex
getState
in interface StateSpaceIndex
model
- State model.
null
if none was found.
StateSpaceException
- If the state space contains errors.protected State getState(Model model, int hash) throws StateSpaceException
model
- State model.hash
- Its hash code.
StateSpaceException
public void addToIndex(State state)
state
- State to be added.public void removeFromIndex(State state)
state
- State to be removed.public void resetIndex()
public StateSpace getStateSpace()
StateSpaceIndex
getStateSpace
in interface StateSpaceIndex
public void clearCache()
StateSpaceIndex
clearCache
in interface StateSpaceIndex
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |