public final class ConstraintCombiner
extends java.lang.Object
ConstraintCombiner
class provides methods to create new constraints by combining
existing ones (by performing negation, logical conjunction and logical disjunction).Modifier and Type | Method and Description |
---|---|
static Constraint |
makeConjunction(Constraint first,
Constraint second)
Creates a new constraint by performing logical conjunction on the specified constraints.
|
static Constraint |
makeDisjunction(Constraint first,
Constraint second)
Creates a new constraint by performing logical disjunction on the specified constraints.
|
static Constraint |
makeNegation(Constraint constraint)
Creates a new constraint by performing logical negation on the specified constraint.
|
public static Constraint makeNegation(Constraint constraint)
constraint
- A constraint object.java.lang.IllegalArgumentException
- if the parameter equals null
;
if the parameter is not a formula-based constraint (its type
is not ConstraintKind.FORMULA_BASED).public static Constraint makeConjunction(Constraint first, Constraint second)
first
- A constraint object.second
- A constraint object.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).public static Constraint makeDisjunction(Constraint first, Constraint second)
first
- A constraint object.second
- A constraint object.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).