ConForM.CoopnTools.CoKer
Class CoopnSubstitution

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

public class CoopnSubstitution
extends java.lang.Object
implements CoopnSyntacticElement

Substitutions in coopntools

See Also:
Serialized Form

Constructor Summary
CoopnSubstitution()
          Build a new empty substitution.
CoopnSubstitution(CoopnSubstitution initial)
          Build a new substitution, with initial assignments.
 
Method Summary
 void add(CoopnClassCreationSymbolVariable variable, CoopnClassCreationSymbol value)
          Add a classCreation-symbol-variable assignment.
 void add(CoopnClassDestructionSymbolVariable variable, CoopnClassDestructionSymbol value)
          Add a classDestruction-symbol-variable assignment.
 void add(CoopnClassGateSymbolVariable variable, CoopnClassGateSymbol value)
          Add a classGate-symbol-variable assignment.
 void add(CoopnClassMethodSymbolVariable variable, CoopnClassMethodSymbol value)
          Add a classMethod-symbol-variable assignment.
 void add(CoopnContextGateSymbolVariable variable, CoopnContextGateSymbol value)
          Add a contextGate-symbol-variable assignment.
 void add(CoopnContextMethodSymbolVariable variable, CoopnContextMethodSymbol value)
          Add a contextMethod-symbol-variable assignment.
 void add(CoopnGeneratorSymbolVariable variable, CoopnGeneratorSymbol value)
          Add a generator-symbol-variable assignment.
 void add(CoopnObjectSymbolVariable variable, CoopnObjectSymbol value)
          Add a object-symbol-variable assignment.
 void add(CoopnOperationSymbolVariable variable, CoopnOperationSymbol value)
          Add a operation-symbol-variable assignment.
 void add(CoopnSortSymbolVariable variable, CoopnSortSymbol value)
          Add a sort-symbol-variable assignment.
 void add(CoopnTermVariable variable, CoopnTerm value)
          Add a term-variable assignment.
 void add(CoopnTypeSymbolVariable variable, CoopnTypeSymbol value)
          Add a type-symbol-variable assignment.
 void add(CoopnVariableSymbol variable, CoopnTerm value)
          Add a CO-OPN assignment.
 void add(ObjectSetVariable variable, ObjectSet value)
          Add an object-set-variable assignment.
 void add(SemanticEventVariable variable, SemanticEvent value)
          Add a semantic-event-variable assignment.
 void add(StateVariable variable, State value)
          Add a state-variable assignment.
 java.lang.Object assignmentOf(java.lang.Object variable)
          Get the assigned value of a variable.
 java.lang.Object clone()
          Cloning method.
 boolean equals(java.lang.Object o)
          Equality method.
 int hashCode()
          Hashcode method.
 java.lang.String toCompleteString()
          String conversion method.
 java.lang.String toCompleteString(CoopnEnv env)
          String conversion method.
 java.lang.String toCompleteString(CoopnEnv env, int indent)
          String conversion method.
 java.lang.String toCompleteString(int indent)
           
 java.lang.String toString()
          String conversion method.
 java.lang.String toString(CoopnEnv env)
          String conversion method.
 java.lang.String toString(CoopnEnv env, int indent)
          String conversion method.
 java.lang.String toString(int indent)
           
 java.util.Set variableSet()
          Get the set of all assigned variables.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoopnSubstitution

public CoopnSubstitution()
Build a new empty substitution. The substitution has no initial assignment.

CoopnSubstitution

public CoopnSubstitution(CoopnSubstitution initial)
Build a new substitution, with initial assignments. The substitution has as initial assignment the current assignments of the parameter.
Parameters:
initial - the initial substitution
Method Detail

variableSet

public java.util.Set variableSet()
Get the set of all assigned variables.
Returns:
an unmodifiable Set containing all the assigned variables.

assignmentOf

public java.lang.Object assignmentOf(java.lang.Object variable)
Get the assigned value of a variable.
Parameters:
variable - the variable
Returns:
the assigned value, or null if the parameter does not correspond to an assigned variable.

equals

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

hashCode

public int hashCode()
Description copied from interface: CoopnSyntacticElement
Hashcode method. Must be defined in the inherited classes.
Specified by:
hashCode in interface CoopnSyntacticElement
Overrides:
hashCode in class java.lang.Object
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticElement
Returns:
the hash code.

clone

public java.lang.Object clone()
Description copied from interface: CoopnSyntacticElement
Cloning method. Must be defined in the inherited classes.
Specified by:
clone in interface CoopnSyntacticElement
Overrides:
clone in class java.lang.Object
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticElement
Returns:
a clone object.

toString

public java.lang.String toString(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 readable from users. The string representation is not required to include the comments associated to the element, if any.
Specified by:
toString in interface CoopnSyntacticElement
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.

toString

public java.lang.String toString(CoopnEnv env)
Description copied from interface: CoopnSyntacticElement
String conversion method. Use an identation of 0. This routine converts an element into a string representing it. The string representation is intended to be readable from users. The string representation is not required to include the comments associated to the element, if any.
Specified by:
toString in interface CoopnSyntacticElement
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticElement
Parameters:
env - the environment deciding the form of the display
Returns:
a String image of the element.

toString

public java.lang.String toString(int indent)

toString

public java.lang.String toString()
Description copied from interface: CoopnSyntacticElement
String conversion method. Use no environment and an identation of 0. This routine converts an element into a string representing it. The string representation is intended to be readable from users. The string representation is not required to include the comments associated to the element, if any.
Specified by:
toString in interface CoopnSyntacticElement
Overrides:
toString in class java.lang.Object
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticElement
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.
Specified by:
toCompleteString in interface CoopnSyntacticElement
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.

toCompleteString

public java.lang.String toCompleteString(CoopnEnv env)
Description copied from interface: CoopnSyntacticElement
String conversion method. Use an identation of 0. 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.
Specified by:
toCompleteString in interface CoopnSyntacticElement
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticElement
Parameters:
env - the environment deciding the form of the display
Returns:
a String image of the element.

toCompleteString

public java.lang.String toCompleteString(int indent)

toCompleteString

public java.lang.String toCompleteString()
Description copied from interface: CoopnSyntacticElement
String conversion method. Use no environment and an identation of 0. 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.
Specified by:
toCompleteString in interface CoopnSyntacticElement
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticElement
Returns:
a String image of the element.

add

public void add(CoopnVariableSymbol variable,
                CoopnTerm value)
Add a CO-OPN assignment.
Parameters:
variable - the variable to assign
value - the assigned value
Throws:
java.lang.IllegalArgumentException - A parameter is invalid, or the variable is already assigned in this substitution.

add

public void add(CoopnTermVariable variable,
                CoopnTerm value)
Add a term-variable assignment. Meta-level.
Parameters:
variable - the variable to assign
value - the assigned value
Throws:
java.lang.IllegalArgumentException - A parameter is invalid, or the variable is already assigned in this substitution.

add

public void add(CoopnTypeSymbolVariable variable,
                CoopnTypeSymbol value)
Add a type-symbol-variable assignment. Meta-level.
Parameters:
variable - the variable to assign
value - the assigned value
Throws:
java.lang.IllegalArgumentException - A parameter is invalid, or the variable is already assigned in this substitution.

add

public void add(CoopnSortSymbolVariable variable,
                CoopnSortSymbol value)
Add a sort-symbol-variable assignment. Meta-level.
Parameters:
variable - the variable to assign
value - the assigned value
Throws:
java.lang.IllegalArgumentException - A parameter is invalid, or the variable is already assigned in this substitution.

add

public void add(CoopnOperationSymbolVariable variable,
                CoopnOperationSymbol value)
Add a operation-symbol-variable assignment. Meta-level.
Parameters:
variable - the variable to assign
value - the assigned value
Throws:
java.lang.IllegalArgumentException - A parameter is invalid, or the variable is already assigned in this substitution.

add

public void add(CoopnObjectSymbolVariable variable,
                CoopnObjectSymbol value)
Add a object-symbol-variable assignment. Meta-level.
Parameters:
variable - the variable to assign
value - the assigned value
Throws:
java.lang.IllegalArgumentException - A parameter is invalid, or the variable is already assigned in this substitution.

add

public void add(CoopnGeneratorSymbolVariable variable,
                CoopnGeneratorSymbol value)
Add a generator-symbol-variable assignment. Meta-level.
Parameters:
variable - the variable to assign
value - the assigned value
Throws:
java.lang.IllegalArgumentException - A parameter is invalid, or the variable is already assigned in this substitution.

add

public void add(CoopnContextGateSymbolVariable variable,
                CoopnContextGateSymbol value)
Add a contextGate-symbol-variable assignment. Meta-level.
Parameters:
variable - the variable to assign
value - the assigned value
Throws:
java.lang.IllegalArgumentException - A parameter is invalid, or the variable is already assigned in this substitution.

add

public void add(CoopnContextMethodSymbolVariable variable,
                CoopnContextMethodSymbol value)
Add a contextMethod-symbol-variable assignment. Meta-level.
Parameters:
variable - the variable to assign
value - the assigned value
Throws:
java.lang.IllegalArgumentException - A parameter is invalid, or the variable is already assigned in this substitution.

add

public void add(CoopnClassGateSymbolVariable variable,
                CoopnClassGateSymbol value)
Add a classGate-symbol-variable assignment. Meta-level.
Parameters:
variable - the variable to assign
value - the assigned value
Throws:
java.lang.IllegalArgumentException - A parameter is invalid, or the variable is already assigned in this substitution.

add

public void add(CoopnClassMethodSymbolVariable variable,
                CoopnClassMethodSymbol value)
Add a classMethod-symbol-variable assignment. Meta-level.
Parameters:
variable - the variable to assign
value - the assigned value
Throws:
java.lang.IllegalArgumentException - A parameter is invalid, or the variable is already assigned in this substitution.

add

public void add(CoopnClassCreationSymbolVariable variable,
                CoopnClassCreationSymbol value)
Add a classCreation-symbol-variable assignment. Meta-level.
Parameters:
variable - the variable to assign
value - the assigned value
Throws:
java.lang.IllegalArgumentException - A parameter is invalid, or the variable is already assigned in this substitution.

add

public void add(CoopnClassDestructionSymbolVariable variable,
                CoopnClassDestructionSymbol value)
Add a classDestruction-symbol-variable assignment. Meta-level.
Parameters:
variable - the variable to assign
value - the assigned value
Throws:
java.lang.IllegalArgumentException - A parameter is invalid, or the variable is already assigned in this substitution.

add

public void add(StateVariable variable,
                State value)
Add a state-variable assignment. Scenario level.
Parameters:
variable - the variable to assign
value - the assigned value
Throws:
java.lang.IllegalArgumentException - A parameter is invalid, or the variable is already assigned in this substitution.

add

public void add(SemanticEventVariable variable,
                SemanticEvent value)
Add a semantic-event-variable assignment. Scenario level.
Parameters:
variable - the variable to assign
value - the assigned value
Throws:
java.lang.IllegalArgumentException - A parameter is invalid, or the variable is already assigned in this substitution.

add

public void add(ObjectSetVariable variable,
                ObjectSet value)
Add an object-set-variable assignment. Scenario level.
Parameters:
variable - the variable to assign
value - the assigned value
Throws:
java.lang.IllegalArgumentException - A parameter is invalid, or the variable is already assigned in this substitution.