javax.constraints.extra
Class ConstraintTraceVar

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

public class ConstraintTraceVar
extends AbstractConstraint

This constraint allows a user to trace a variable logging a given event every time when it occurs


Constructor Summary
ConstraintTraceVar(Var var, PropagationEvent event)
           
 
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 methods subscribes MyPropagator to the "event" for the variable "var"
 
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

ConstraintTraceVar

public ConstraintTraceVar(Var var,
                          PropagationEvent event)
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()
This methods subscribes MyPropagator to the "event" for the variable "var"

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