ConForM.CoopnTools.CoKer.ScenarioMgr
Class Transition

java.lang.Object
  |
  +--ConForM.CoopnTools.CoKer.ScenarioMgr.ScenarioElement
        |
        +--ConForM.CoopnTools.CoKer.ScenarioMgr.Transition
All Implemented Interfaces:
java.lang.Cloneable, CoopnSyntacticElement, java.io.Serializable

public class Transition
extends ScenarioElement

Transitions in the CO-OPN semantics.

See Also:
Serialized Form

Field Summary
protected  State after
           
protected  State before
           
protected  ObjectSet freed
           
protected  SemanticEvent label
           
protected  ObjectSet waited
           
 
Constructor Summary
Transition(State before, ObjectSet waited, SemanticEvent label, ObjectSet freed, State after)
          Build a new transition, passing from state "before" to state "after", and labelled by "label".
Transition(State before, SemanticEvent label, State after)
          Build a new transition, passing from state "before" to state "after", and labelled by "label".
 
Method Summary
 State afterState()
          Get the state after the transition.
 java.lang.String afterString()
          Get the state after the transition.
 State beforeState()
          Get the state before the transition.
 java.lang.String beforeString()
          Get the state before the transition as a String.
 java.lang.Object clone()
          Cloning method.
 java.lang.String compactString(java.lang.String name)
          Return a compact identifier for the state, based on hashCode.
 boolean equals(java.lang.Object o)
          Equality method.
 ObjectSet freed()
          Get the set of freed object by the transition.
 int hashCode()
          Hashcode method.
 ScenarioElement interpret(CoopnSubstitution sigma)
          Interpretation of this element according to a substitution.
 SemanticEvent label()
          Get the label of the transition.
 java.lang.String labelString()
          Get the label of the transition.
 java.lang.String toCompleteString(CoopnEnv env, int indent)
          String conversion method.
 java.lang.String toPresentationString(CoopnEnv env, int indent)
           
 java.lang.String toString(CoopnEnv env, int indent)
          String conversion method.
 ObjectSet waited()
          Get the set of waited object by the transition.
 
Methods inherited from class ConForM.CoopnTools.CoKer.ScenarioMgr.ScenarioElement
cloneScenarioElement, toCompleteString, toCompleteString, toCompleteString, toString, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

before

protected State before

after

protected State after

waited

protected ObjectSet waited

freed

protected ObjectSet freed

label

protected SemanticEvent label
Constructor Detail

Transition

public Transition(State before,
                  SemanticEvent label,
                  State after)
Build a new transition, passing from state "before" to state "after", and labelled by "label".

Transition

public Transition(State before,
                  ObjectSet waited,
                  SemanticEvent label,
                  ObjectSet freed,
                  State after)
Build a new transition, passing from state "before" to state "after", and labelled by "label". Objects sets may be null, denoting an empty object migration.
Method Detail

interpret

public ScenarioElement interpret(CoopnSubstitution sigma)
Interpretation of this element according to a substitution.
Overrides:
interpret in class ScenarioElement
Parameters:
sigma - the substitution; cannot be null
Returns:
a new ScenarioElement object, coreesponding to the interpretation.

equals

public boolean equals(java.lang.Object o)
Description copied from class: ScenarioElement
Equality method. Must be defined in the inherited classes.
Overrides:
equals in class ScenarioElement
Following copied from class: ConForM.CoopnTools.CoKer.ScenarioMgr.ScenarioElement
Parameters:
obj - the object to compare
Returns:
true iff this object and the parameter are equals.

hashCode

public int hashCode()
Description copied from class: ScenarioElement
Hashcode method. Must be defined in the inherited classes.
Overrides:
hashCode in class ScenarioElement
Following copied from class: ConForM.CoopnTools.CoKer.ScenarioMgr.ScenarioElement
Returns:
the hash code.

compactString

public java.lang.String compactString(java.lang.String name)
Return a compact identifier for the state, based on hashCode.

toPresentationString

public java.lang.String toPresentationString(CoopnEnv env,
                                             int indent)

toString

public java.lang.String toString(CoopnEnv env,
                                 int indent)
Description copied from class: ScenarioElement
String conversion method. This routine converts an element into a string representing it, by transforming it using toText.
Overrides:
toString in class ScenarioElement
Following copied from class: ConForM.CoopnTools.CoKer.ScenarioMgr.ScenarioElement
Parameters:
env - the environment deciding the form of the display
indent - the identation factor
Returns:
a String image of the element.

toCompleteString

public java.lang.String toCompleteString(CoopnEnv env,
                                         int indent)
Description copied from interface: CoopnSyntacticElement
String conversion method. This routine converts an element into a string representing it. The string representation is intended to be as complete as possible, even if the resulting string is not more readable. The string representation is not required to include the comments associated to the element, if any.
Overrides:
toCompleteString in class ScenarioElement
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticElement
Parameters:
env - the environment deciding the form of the display. A null values indicates a default form.
indent - the identation factor. A zero value indicates no indentation at all.
Returns:
a String image of the element.

beforeState

public State beforeState()
Get the state before the transition.

afterState

public State afterState()
Get the state after the transition.

waited

public ObjectSet waited()
Get the set of waited object by the transition.

freed

public ObjectSet freed()
Get the set of freed object by the transition.

label

public SemanticEvent label()
Get the label of the transition.

beforeString

public java.lang.String beforeString()
Get the state before the transition as a String. More efficient than beforeState().toString().

afterString

public java.lang.String afterString()
Get the state after the transition. More efficient than afterState().toString().

labelString

public java.lang.String labelString()
Get the label of the transition. More efficient than label().toString().

clone

public java.lang.Object clone()
Cloning method.
Overrides:
clone in class ScenarioElement
Following copied from class: ConForM.CoopnTools.CoKer.ScenarioMgr.ScenarioElement
Returns:
a clone object.