javax.constraints.impl.constraint
Class ConstraintTrue

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

public class ConstraintTrue
extends AbstractConstraint

This is a constant constraint that always will be successfully posted and executed without changing anything in its environment.


Constructor Summary
ConstraintTrue(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

ConstraintTrue

public ConstraintTrue(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 1

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