java.lang.Object
net.ssehub.easy.varModel.model.filter.mandatoryVars.Context

class Context extends Object
Stores knowledge about the current constraint visitation (the context of earlier elements).
Author:
El-Sharkawy
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private Deque<String>
     
    private int
     
    private boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor for this class.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) void
    addParent(String parent)
    Adds a parent, e.g.
    (package private) void
    Should be called after a constraint was visited completly, to clear the data.
    (package private) void
    Marks that a compound(access) was visited and that now a slot is visited of the compound.
    (package private) void
    A compound(slot) was visited, back to upper compound.
    (package private) int
    Returns the depth, a depth > 0 means that currently a slot of a compound is visited).
    (package private) void
    Marks that at least one variable was found during the current constraint visitation.
    (package private) boolean
    Returns whether variables were changed during the current constraint visitation.
    (package private) String
    Returns the current visited parent of the current variable.
    (package private) boolean
    Returns whether currently a qualified name for a IDecisionVariable as parent is stored for the current visitation.

    Methods inherited from class java.lang.Object

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

    • currentParents

      private Deque<String> currentParents
    • depth

      private int depth
    • elementsFound

      private boolean elementsFound
  • Constructor Details

    • Context

      Context()
      Constructor for this class.
  • Method Details

    • clear

      void clear()
      Should be called after a constraint was visited completly, to clear the data.
    • compoundDown

      void compoundDown()
      Marks that a compound(access) was visited and that now a slot is visited of the compound.
      See Also:
    • compoundUp

      void compoundUp()
      A compound(slot) was visited, back to upper compound.
      See Also:
    • depth

      int depth()
      Returns the depth, a depth > 0 means that currently a slot of a compound is visited).
      Returns:
      A value >= 0.
    • hasParent

      boolean hasParent()
      Returns whether currently a qualified name for a IDecisionVariable as parent is stored for the current visitation.
      Returns:
      true a parent exists for the current visited variable.
      See Also:
    • getParent

      String getParent()
      Returns the current visited parent of the current variable.
      Returns:
      The parent.
      See Also:
    • addParent

      void addParent(String parent)
      Adds a parent, e.g. if a compound access is visited.
      Parameters:
      parent - The current visited variable, before the visitation of the slot starts.
      See Also:
    • elementFound

      void elementFound()
      Marks that at least one variable was found during the current constraint visitation.
      See Also:
    • elementsWereFound

      boolean elementsWereFound()
      Returns whether variables were changed during the current constraint visitation.
      Returns:
      trueAt least one variable was found.
      See Also: