public final class IntegerEquation<V>
extends java.lang.Object
IntegerEquation
represents an equality or inequality of two integer variables
(objects of IntegerVariable
).Modifier and Type | Field and Description |
---|---|
boolean |
equal
The equality/inequality flag.
|
V |
lhs
The left-hand-side variable.
|
V |
rhs
The right-hand-side variable.
|
java.math.BigInteger |
val
The right-hand-side value.
|
boolean |
value
The variable-value/variable-variable flag.
|
Constructor and Description |
---|
IntegerEquation(V lhs,
java.math.BigInteger rhs,
boolean equal)
Constructs an equality/inequality.
|
IntegerEquation(V lhs,
V rhs,
boolean equal)
Constructs an equality/inequality.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contradictsTo(IntegerEquation<V> equation)
Checks whether this equation contradicts to the given one.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
boolean |
strongerThan(IntegerEquation<V> equation)
Checks whether this equation (
A ) is stronger than the given one (B ), i.e. |
java.lang.String |
toString() |
public boolean equal
public boolean value
public V lhs
public V rhs
public java.math.BigInteger val
public IntegerEquation(V lhs, V rhs, boolean equal)
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 IntegerEquation(V lhs, java.math.BigInteger rhs, boolean equal)
lhs
- the left-hand-side variable.rhs
- the right-hand-side value.equal
- the equality/inequality flag.java.lang.IllegalArgumentException
- if lhs
or rhs
is null.public boolean contradictsTo(IntegerEquation<V> equation)
equation
- the equation to be matched with this one.true
if this equation definitely contradicts to the given one;
false
if this equation seems to be consistent to the given one.public boolean strongerThan(IntegerEquation<V> equation)
A
) is stronger than the given one (B
), i.e.
the property A => B
holds.equation
- the equation to be matched with this one.true
if this equation is definitely stronger than the given one;
false
if this equation does not seem to be stronger than the given one.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object