Class ScopeAssignments

java.lang.Object
net.ssehub.easy.reasoning.sseReasoner.functions.ScopeAssignments

public class ScopeAssignments extends Object
Class contains variables that were assigned in a specific scope..
Author:
Sizonenko
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private Set<net.ssehub.easy.varModel.confModel.IDecisionVariable>
     
    private Map<net.ssehub.easy.varModel.model.IModelElement,Set<net.ssehub.easy.varModel.confModel.IDecisionVariable>>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Sole constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAssignedVariable(net.ssehub.easy.varModel.confModel.IDecisionVariable variable)
    Method for registering a variable that was assigned.
    void
    Clears all assignments.
    void
    clearScopeAssignments(net.ssehub.easy.varModel.model.Project scope)
    Clears all scope assignments for scope.
    void
    setCurrentScope(net.ssehub.easy.varModel.model.Constraint constraint)
    Defines the current scope due to the parents of the given constraint.
    void
    setCurrentScope(net.ssehub.easy.varModel.model.IModelElement currentScope)
    Defines the current scope.
    boolean
    wasAssignedInThisScope(net.ssehub.easy.varModel.confModel.IDecisionVariable variable)
    Method for determining if variable was assigned in the specific scope.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • scopeAssignments

      private Map<net.ssehub.easy.varModel.model.IModelElement,Set<net.ssehub.easy.varModel.confModel.IDecisionVariable>> scopeAssignments
    • currentScopeSet

      private transient Set<net.ssehub.easy.varModel.confModel.IDecisionVariable> 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. Call setCurrentScope(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. Call setCurrentScope(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 for scope.
      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 given constraint.
      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