Class ScopeAssignments
java.lang.Object
net.ssehub.easy.reasoning.sseReasoner.functions.ScopeAssignments
Class contains variables that were assigned in a specific scope..
- Author:
- Sizonenko
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAssignedVariable(net.ssehub.easy.varModel.confModel.IDecisionVariable variable) Method for registering a variable that was assigned.voidclear()Clears all assignments.voidclearScopeAssignments(net.ssehub.easy.varModel.model.Project scope) Clears all scope assignments forscope.voidsetCurrentScope(net.ssehub.easy.varModel.model.Constraint constraint) Defines the current scope due to the parents of the givenconstraint.voidsetCurrentScope(net.ssehub.easy.varModel.model.IModelElement currentScope) Defines the current scope.booleanwasAssignedInThisScope(net.ssehub.easy.varModel.confModel.IDecisionVariable variable) Method for determining if variable was assigned in the specific scope.
-
Field Details
-
scopeAssignments
-
currentScopeSet
-
-
Constructor Details
-
ScopeAssignments
public ScopeAssignments()Sole constructor.
-
-
Method Details
-
addAssignedVariable
public void addAssignedVariable(net.ssehub.easy.varModel.confModel.IDecisionVariable variable) Method for registering a variable that was assigned. CallsetCurrentScope(IModelElement)before.- Parameters:
variable- Assigned variable.
-
wasAssignedInThisScope
public boolean wasAssignedInThisScope(net.ssehub.easy.varModel.confModel.IDecisionVariable variable) Method for determining if variable was assigned in the specific scope. CallsetCurrentScope(IModelElement)before.- Parameters:
variable- Variable under question.- Returns:
- True if variable already was assigned in this scope.
-
clear
public void clear()Clears all assignments. -
clearScopeAssignments
public void clearScopeAssignments(net.ssehub.easy.varModel.model.Project scope) Clears all scope assignments forscope.- Parameters:
scope- the scope to clear
-
setCurrentScope
public void setCurrentScope(net.ssehub.easy.varModel.model.Constraint constraint) Defines the current scope due to the parents of the givenconstraint.- Parameters:
constraint- defining the current scope
-
setCurrentScope
public void setCurrentScope(net.ssehub.easy.varModel.model.IModelElement currentScope) Defines the current scope.- Parameters:
currentScope- the current scope
-