public final class IntegerClause<V>
extends java.lang.Object
IntegerClause represents a clause, which is a set of OR- or AND-connected
equations (objects of IntegerEquation).| Modifier and Type | Class and Description |
|---|---|
static class |
IntegerClause.Builder<V>
IntegerClause.Builder is a IntegerClause builder. |
static class |
IntegerClause.Type
IntegerClause.Type contains clause types. |
| Constructor and Description |
|---|
IntegerClause(IntegerClause.Type type,
java.util.Collection<IntegerEquation<V>> equations)
Constructs an clause of the given type with the given set of equations.
|
IntegerClause(IntegerClause<V> rhs)
Constructs a copy of the clause.
|
IntegerClause(IntegerEquation<V> equation)
Constructs an clause with the given equation.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contradictsTo(IntegerEquation<V> equation)
Checks whether this clause contradicts to the given equation.
|
boolean |
equals(java.lang.Object o) |
java.util.Collection<IntegerEquation<V>> |
getEquations()
Returns the equations of the clause.
|
IntegerClause.Type |
getType()
Returns the type of the clause.
|
java.util.Collection<V> |
getVariables()
Returns the variables used in the clause.
|
int |
hashCode() |
int |
size()
Returns the number of equations in the clause.
|
boolean |
strongerThan(IntegerClause<V> clause)
Checks whether this clause (
A) is stronger than the given one (B), i.e. |
boolean |
strongerThan(IntegerEquation<V> equation)
Checks whether this clause (
A) is stronger than the given equation (B), i.e. |
java.lang.String |
toString() |
public IntegerClause(IntegerClause.Type type, java.util.Collection<IntegerEquation<V>> equations)
type - the clause type.equations - the equations.java.lang.IllegalArgumentException - if type or equations is null.public IntegerClause(IntegerEquation<V> equation)
equation - the equation.java.lang.IllegalArgumentException - if equation is null.public IntegerClause(IntegerClause<V> rhs)
rhs - the clause to be copied.java.lang.IllegalArgumentException - if rhs is null.public IntegerClause.Type getType()
public int size()
public java.util.Collection<IntegerEquation<V>> getEquations()
public java.util.Collection<V> getVariables()
public boolean contradictsTo(IntegerEquation<V> equation)
equation - the equation to be matched with this one.true if this clause definitely contradicts to the given equation;
false if this clause seems to be consistent to the given equation.public boolean strongerThan(IntegerEquation<V> equation)
A) is stronger than the given equation (B), i.e.
the property A => B holds.equation - the equation to be matched with this one.true if this clause is definitely stronger than the given equation;
false if this clause does not seem to be stronger than the given equation.public boolean strongerThan(IntegerClause<V> clause)
A) is stronger than the given one (B), i.e.
the property A => B holds.clause - the clause to be matched with this one.true if this clause is definitely stronger than the given one;
false if this clause does not seem to be stronger than the given one.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object