jopt.csp.variable
Interface CspConstraint


public interface CspConstraint

Interface implemented by constraints that are added to the CspSolver


Method Summary
 boolean isFalse()
          Returns true if constraint cannot be satisfied
 boolean isTrue()
          Returns true if constraint cannot be dissatisfied
 CspBooleanExpr toBoolean()
          Returns a boolean expression that wraps this constraint
 

Method Detail

isFalse

public boolean isFalse()
Returns true if constraint cannot be satisfied

Returns:
true if constraint cannot be satisfied; false if constraint could still be satisfied

isTrue

public boolean isTrue()
Returns true if constraint cannot be dissatisfied

Returns:
true if constraint cannot be dissatisfied; false if constraint could still be dissatisfied

toBoolean

public CspBooleanExpr toBoolean()
Returns a boolean expression that wraps this constraint

Returns:
returns boolean expression that evaluates to true of the constraint is true and false when the constraint is false