Module org.maxicp

Class CPBoolVarIsEqual

java.lang.Object
org.maxicp.cp.engine.core.CPIntVarImpl
org.maxicp.cp.engine.core.CPBoolVarIsEqual
All Implemented Interfaces:
Serializable, CPBoolVar, CPIntVar, CPVar, BoolExpression, Expression, IntExpression, BoolVar, ConcreteBoolVar, ConcreteIntVar, ConcreteVar, IntVar, Var

public class CPBoolVarIsEqual extends CPIntVarImpl implements CPBoolVar
See Also:
  • Constructor Details

    • CPBoolVarIsEqual

      public CPBoolVarIsEqual(CPIntVar x, int v)
  • Method Details

    • isTrue

      public boolean isTrue()
      Description copied from interface: CPBoolVar
      Tests if the variable is fixed to true
      Specified by:
      isTrue in interface CPBoolVar
      Returns:
      true if the variable is fixed to true (value 1)
    • isFalse

      public boolean isFalse()
      Description copied from interface: CPBoolVar
      Tests if the variable is fixed to false
      Specified by:
      isFalse in interface CPBoolVar
      Returns:
      true if the variable is fixed to false (value 0)
    • fix

      public void fix(boolean b) throws InconsistencyException
      Description copied from interface: CPBoolVar
      Fixes the variable
      Specified by:
      fix in interface CPBoolVar
      Parameters:
      b - the value to assign to this boolean variable
      Throws:
      InconsistencyException - is thrown if the value is not in the domain