public static final class IntegerClause.Builder<V>
extends java.lang.Object
IntegerClause.Builder is a IntegerClause builder.| Constructor and Description |
|---|
IntegerClause.Builder(IntegerClause.Builder<V> rhs)
Constructs a copy of the clause builder.
|
IntegerClause.Builder(IntegerClause.Type type)
Constructs a clause builder.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addClause(IntegerClause<V> clause)
Adds the equations of the given clause to this clause.
|
void |
addClauses(java.util.Collection<IntegerClause<V>> clauses)
Adds the equations of the given clauses to this clause.
|
void |
addEquation(IntegerEquation<V> equation)
Adds the equation to the clause.
|
void |
addEquation(V var,
java.math.BigInteger val,
boolean equal)
Adds the equality
var == val or inequality var != val to the clause. |
void |
addEquation(V lhs,
V rhs,
boolean equal)
Adds the equality
lhs == rhs or inequality lhs != rhs to the clause. |
void |
addEquations(java.util.Collection<IntegerEquation<V>> equations)
Adds the equations to this clause.
|
IntegerClause<V> |
build()
Builds an integer clause.
|
int |
size()
Returns the number of equations in the clause.
|
public IntegerClause.Builder(IntegerClause.Type type)
type - the clause type.java.lang.IllegalArgumentException - if type is null.public IntegerClause.Builder(IntegerClause.Builder<V> rhs)
rhs - the clause builder to be copied.public int size()
public void addEquation(IntegerEquation<V> equation)
equation - the equation to be added.java.lang.IllegalArgumentException - if equation is null.public void addEquation(V lhs, V rhs, boolean equal)
lhs == rhs or inequality lhs != rhs to the clause.lhs - the left-hand-side variable.rhs - the right-hand-side variable.equal - the equality/inequality flag.java.lang.IllegalArgumentException - if lhs or rhs is null.public void addEquation(V var, java.math.BigInteger val, boolean equal)
var == val or inequality var != val to the clause.var - the left-hand-side variable.val - the right-hand-side value.equal - the equality/inequality flag.java.lang.IllegalArgumentException - if var or val is null.public void addEquations(java.util.Collection<IntegerEquation<V>> equations)
equations - the equations to be added.java.lang.IllegalArgumentException - if equations is null.public void addClause(IntegerClause<V> clause)
clause - the clause whose equations to be added.java.lang.IllegalArgumentException - if clause is null.public void addClauses(java.util.Collection<IntegerClause<V>> clauses)
clauses - the clauses whose equations to be added.java.lang.IllegalArgumentException - if clauses is null.public IntegerClause<V> build()