public final class ConstraintUtils
extends java.lang.Object
ConstraintUtils
class provides utility methods to deal with constraints.Modifier and Type | Method and Description |
---|---|
static Constraint |
newConstraint(java.util.Collection<? extends Node> formulae)
Creates a constraint from the specified collection of formula expressions.
|
static Constraint |
newConstraint(Node expr)
Creates a constraint from the specified expression.
|
static SolverResult |
solve(Constraint constraint)
Solves the specified constraint with the solver specified as default
for the given constraint kind.
|
public static Constraint newConstraint(Node expr)
expr
- Expression to be used as a source for the constraint.java.lang.IllegalArgumentException
- if the argument is null
.public static Constraint newConstraint(java.util.Collection<? extends Node> formulae)
formulae
- Collection of formula expressions.java.lang.IllegalArgumentException
- if the argument is null
.public static SolverResult solve(Constraint constraint)
constraint
- Constraint to be solved.java.lang.IllegalArgumentException
- if the argument is null
.