javax.constraints.impl.constraint
Class ConstraintFalse

java.lang.Object
  extended by javax.constraints.impl.CommonBase
      extended by javax.constraints.impl.AbstractConstraint
          extended by javax.constraints.impl.constraint.ConstraintFalse
All Implemented Interfaces:
Constraint

public class ConstraintFalse
extends AbstractConstraint

This is a constant constraint that always will fail when it is posted or executed.


Constructor Summary
ConstraintFalse(Problem problem)
           
 
Method Summary
 VarBool asBool()
          This method returns a Var variable that is equal 1 if the constraint is satisfied and equals 0 if it is violated.
 void post()
          This method takes a constraint's implementation and uses its own RI-specific post-method.
 
Methods inherited from class javax.constraints.impl.AbstractConstraint
and, implies, negation, or, post
 
Methods inherited from class javax.constraints.impl.CommonBase
getImpl, getName, getObject, getProblem, setImpl, setName, setObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.constraints.Constraint
getImpl, getName, getObject, getProblem, setImpl, setName, setObject
 

Constructor Detail

ConstraintFalse

public ConstraintFalse(Problem problem)
Method Detail

asBool

public VarBool asBool()
Description copied from class: AbstractConstraint
This method returns a Var variable that is equal 1 if the constraint is satisfied and equals 0 if it is violated. Each constraint that participates in logical expressions should implement this method.

Specified by:
asBool in interface Constraint
Overrides:
asBool in class AbstractConstraint
Returns:
a VarBool variable that is equal to 0

post

public void post()
Description copied from class: AbstractConstraint
This method takes a constraint's implementation and uses its own RI-specific post-method.

Specified by:
post in interface Constraint
Overrides:
post in class AbstractConstraint