Class TraceConstraint

All Implemented Interfaces:
Iterable<ConstraintVariable>

public class TraceConstraint extends ConstraintTree
TraceConstraint objects ensure that the attribute being traced will be treated as a parameter and not a member variable
  • Constructor Details

    • TraceConstraint

      public TraceConstraint()
  • Method Details

    • getVariable

      public UmpleVariable getVariable(int index)
    • getVariables

      public List<UmpleVariable> getVariables()
    • numberOfVariables

      public int numberOfVariables()
    • hasVariables

      public boolean hasVariables()
    • indexOfVariable

      public int indexOfVariable(UmpleVariable aVariable)
    • minimumNumberOfVariables

      public static int minimumNumberOfVariables()
    • addVariable

      public boolean addVariable(UmpleVariable aVariable)
    • removeVariable

      public boolean removeVariable(UmpleVariable aVariable)
    • addVariableAt

      public boolean addVariableAt(UmpleVariable aVariable, int index)
    • addOrMoveVariableAt

      public boolean addOrMoveVariableAt(UmpleVariable aVariable, int index)
    • delete

      public void delete()
      Overrides:
      delete in class ConstraintTree
    • createNew

      public ConstraintTree createNew()
      Description copied from class: ConstraintTree
      Creates a new instance of this class, it is used in clone and addElement in order to copy a tree so that there is a deep copy instead of a shallow one This method needs to be overrided for sub classes of ConstaintTree to function properly.
      Overrides:
      createNew in class ConstraintTree
    • addElement

      public ConstraintVariable addElement(ConstraintVariable aElement)
      Description copied from class: ConstraintTree
      Adds a node to the tree, the three modes are - if nothing exists in the tree: set the element as the root - if the element is an operator: add the root if it is not null as an operand to the operator, and set the operator to the root - if there exists an operator: add the element as an operand to the operator.
      Overrides:
      addElement in class ConstraintTree