Class ConstraintCombiner


  • public final class ConstraintCombiner
    extends java.lang.Object
    The ConstraintCombiner class provides methods to create new constraints by combining existing ones (by performing negation, logical conjunction and logical disjunction).
    • Method Detail

      • makeNegation

        public static Constraint makeNegation​(Constraint constraint)
        Creates a new constraint by performing logical negation on the specified constraint.
        Parameters:
        constraint - A constraint object.
        Returns:
        A new constraint object.
        Throws:
        java.lang.IllegalArgumentException - if the parameter equals null; if the parameter is not a formula-based constraint (its type is not ConstraintKind.FORMULA_BASED).
      • makeConjunction

        public static Constraint makeConjunction​(Constraint first,
                                                 Constraint second)
        Creates a new constraint by performing logical conjunction on the specified constraints.
        Parameters:
        first - A constraint object.
        second - A constraint object.
        Returns:
        A new constraint object.
        Throws:
        java.lang.IllegalArgumentException - if any of the parameters equals null; if any of the parameters is not a formula-based constraint (its type is not ConstraintKind.FORMULA_BASED).
      • makeDisjunction

        public static Constraint makeDisjunction​(Constraint first,
                                                 Constraint second)
        Creates a new constraint by performing logical disjunction on the specified constraints.
        Parameters:
        first - A constraint object.
        second - A constraint object.
        Returns:
        A new constraint object.
        Throws:
        java.lang.IllegalArgumentException - if any of the parameters equals null; if any of the parameters is not a formula-based constraint (its type is not ConstraintKind.FORMULA_BASED).