Class DefaultConstraint

    • Constructor Detail

      • DefaultConstraint

        public DefaultConstraint​(ConstraintSyntaxTree consSyntax,
                                 IModelElement parent)
                          throws CSTSemanticException
        Creates a new constraint from an already parsed syntax tree.
        Parameters:
        consSyntax - the constraint syntax tree
        parent - the object, in which this specific one is embedded
        Throws:
        CSTSemanticException - in case that the constraint semantics cannot be resolved or that the specified constraint does not evaluate to a boolean expression
    • Method Detail

      • setDefaultConstraints

        public void setDefaultConstraints​(ConstraintList defaultConstraints)
        Sets the default constraint list explicitly. Default constraints can be evaluated directly without further constraint/variable dependencies. The attached constraints are temporary.
        Parameters:
        defaultConstraints - the default constraints, may be null for none
      • setDeferredDefaultConstraints

        public void setDeferredDefaultConstraints​(ConstraintList deferredDefaultConstraints)
        Sets the deferred default constraint list explicitly. Default constraints have dependencies and shall be evaluated (initially) after the default constraints. The attached constraints are temporary.
        Parameters:
        deferredDefaultConstraints - the deferred default constraints, may be null for none
      • getDefaultConstraints

        public ConstraintList getDefaultConstraints()
        Returns the default constraint list explicitly. Default constraints can be evaluated directly without further constraint/variable dependencies. The attached constraints are temporary.
        Returns:
        the default constraints, may be null for none
      • getDeferredDefaultConstraints

        public ConstraintList getDeferredDefaultConstraints()
        Returns the deferred default constraint list explicitly. Default constraints have dependencies and shall be evaluated (initially) after the default constraints. The attached constraints are temporary.
        Returns:
        the deferred default constraints, may be null for none
      • getAttachedConstraintsSize

        public int getAttachedConstraintsSize()
        Returns the number of attached constraints. The attached constraints are temporary.
        Returns:
        the number of attached constraints