org.eclipse.emf.henshin.statespace.util
Class StateSpaceMonitor

java.lang.Object
  extended by org.eclipse.emf.henshin.statespace.util.StateSpaceMonitor

public class StateSpaceMonitor
extends Object

A monitor that can be used to track changes in a state space. After creating it, make sure to activate it using setActive(boolean). If you don't need it anymore deactivate, so that it can be garbage collected.


Constructor Summary
StateSpaceMonitor(StateSpace stateSpace)
          Default constructor.
 
Method Summary
 Collection<State> getAddedStates()
          Get the states that have been added to the state space since the activation.
 Collection<State> getRemovedStates()
          Get the states that have been removed to the state space since the activation.
 StateSpace getStateSpace()
          Get the state space to be monitored.
 void reset()
          Reset the tracked information.
 void setActive(boolean active)
          Activate or de-activate this monitor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateSpaceMonitor

public StateSpaceMonitor(StateSpace stateSpace)
Default constructor. This does not activate the monitor.

Parameters:
stateSpace - State space to be monitored.
Method Detail

setActive

public void setActive(boolean active)
Activate or de-activate this monitor.

Parameters:
active - Active flag.

reset

public void reset()
Reset the tracked information.


getStateSpace

public StateSpace getStateSpace()
Get the state space to be monitored.

Returns:
State space.

getAddedStates

public Collection<State> getAddedStates()
Get the states that have been added to the state space since the activation.

Returns:
The added states.

getRemovedStates

public Collection<State> getRemovedStates()
Get the states that have been removed to the state space since the activation.

Returns:
The removed states.