jopt.csp.variable
Interface CspBooleanExpr

All Superinterfaces:
CspIntExpr, CspNumExpr
All Known Subinterfaces:
CspBooleanVariable, CspGenericBooleanExpr

public interface CspBooleanExpr
extends CspIntExpr

Base interface for boolean expressions

Author:
Chris Johnson, Jim Boerkoel

Method Summary
 CspBooleanExpr and(boolean val)
          Creates a boolean expression resulting from anding a constant with this expression
 CspBooleanExpr and(CspBooleanExpr expr)
          Creates a boolean expression resulting from anding another boolean expression with this expression
 CspBooleanExpr and(CspConstraint cons)
          Creates a boolean expression resulting from anding a constraint with this expression
 CspBooleanExpr and(CspGenericBooleanConstant val)
          Creates a boolean expression resulting from anding a generic constant with this expression
 CspBooleanExpr eq(boolean val)
          Creates a boolean expression resulting from setting a constant equal to this expression
 CspBooleanExpr eq(CspBooleanExpr expr)
          Creates a boolean expression resulting from setting a boolean expression equal to this expression
 CspBooleanExpr eq(CspConstraint cons)
          Creates a boolean expression resulting from setting a constraint equal to this expression
 CspBooleanExpr implies(boolean val)
          Creates a boolean expression resulting from this expression implying a constant value
 CspBooleanExpr implies(CspBooleanExpr expr)
          Creates a boolean expression resulting from this expression implying another expression
 CspBooleanExpr implies(CspConstraint cons)
          Creates a boolean expression resulting from this expression implying a constraint
 CspBooleanExpr implies(CspGenericBooleanConstant val)
          Creates a boolean expression resulting from this expression implying a generic constant value
 boolean isFalse()
          Returns true if boolean expression cannot be satisfied
 boolean isTrue()
          Returns whether or not the expression is satisfied yet or not
 CspBooleanExpr not()
          Returns a boolean expression equal to the negation of this one
 CspBooleanExpr or(boolean val)
          Creates a boolean expression resulting from oring a constant with this expression
 CspBooleanExpr or(CspBooleanExpr expr)
          Creates a boolean expression resulting from oring a boolean expression with this expression
 CspBooleanExpr or(CspConstraint cons)
          Creates a boolean expression resulting from oring a constraint with this expression
 CspBooleanExpr or(CspGenericBooleanConstant val)
          Creates a boolean expression resulting from oring a generic constant with this expression
 CspConstraint toConstraint()
          Returns a constraint that represents this boolean expression that can be used in the solver
 CspBooleanExpr xor(boolean val)
          Creates a boolean expression resulting from xoring a constant with this expression
 CspBooleanExpr xor(CspBooleanExpr expr)
          Creates a boolean expression resulting from xoring a boolean expression with this expression
 CspBooleanExpr xor(CspConstraint cons)
          Creates a boolean expression resulting from xoring a constraint with this expression
 CspBooleanExpr xor(CspGenericBooleanConstant val)
          Creates a boolean expression resulting from xoring a generic constant with this expression
 
Methods inherited from interface jopt.csp.variable.CspIntExpr
add, add, add, add, add, add, add, add, between, between, divide, divide, divide, divide, divide, divide, divide, divide, eq, eq, geq, geq, getMax, getMin, gt, gt, leq, leq, lt, lt, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, neq, neq, notBetween, notBetween, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract
 
Methods inherited from interface jopt.csp.variable.CspNumExpr
between, between, between, between, eq, geq, getName, gt, isBound, leq, lt, neq, notBetween, notBetween, notBetween, notBetween, setName
 

Method Detail

and

public CspBooleanExpr and(CspBooleanExpr expr)
Creates a boolean expression resulting from anding another boolean expression with this expression

Parameters:
expr - expression that this boolean expression will be ANDed with
Returns:
CspBooleanExpr representing the expression (this AND expr)

and

public CspBooleanExpr and(CspConstraint cons)
Creates a boolean expression resulting from anding a constraint with this expression

Parameters:
cons - constraint that this boolean expression will be ANDed with
Returns:
CspBooleanExpr representing the expression (this AND cons)

and

public CspBooleanExpr and(boolean val)
Creates a boolean expression resulting from anding a constant with this expression

Parameters:
val - constant value to AND this boolean expression with
Returns:
CspBooleanExpr representing the expression (this AND val)

and

public CspBooleanExpr and(CspGenericBooleanConstant val)
Creates a boolean expression resulting from anding a generic constant with this expression

Parameters:
val - generic constant value to AND this boolean expression with
Returns:
CspBooleanExpr representing the expression (this AND val)

not

public CspBooleanExpr not()
Returns a boolean expression equal to the negation of this one

Returns:
CspBooleanExpr representing the expression (!this)

xor

public CspBooleanExpr xor(CspBooleanExpr expr)
Creates a boolean expression resulting from xoring a boolean expression with this expression

Parameters:
expr - expression that this expression will be XORed with
Returns:
CspBooleanExpr representing the expression (this XOR expr)

xor

public CspBooleanExpr xor(CspConstraint cons)
Creates a boolean expression resulting from xoring a constraint with this expression

Parameters:
cons - constraint involved in creating an expression representing an XOR with this
Returns:
CspBooleanExpr representing the expression (this XOR cons)

xor

public CspBooleanExpr xor(boolean val)
Creates a boolean expression resulting from xoring a constant with this expression

Parameters:
val - the boolean involved in creating an expression representing an XOR with this
Returns:
CspBooleanExpr representing the expression (this XOR val)

xor

public CspBooleanExpr xor(CspGenericBooleanConstant val)
Creates a boolean expression resulting from xoring a generic constant with this expression

Parameters:
val - the generic boolean involved in creating an expression representing an XOR with this
Returns:
CspBooleanExpr representing the expression (this XOR val)

or

public CspBooleanExpr or(CspBooleanExpr expr)
Creates a boolean expression resulting from oring a boolean expression with this expression

Parameters:
expr - expression that this expression will be ORed with
Returns:
CspBooleanExpr representing the expression (this OR expr)

or

public CspBooleanExpr or(CspConstraint cons)
Creates a boolean expression resulting from oring a constraint with this expression

Parameters:
cons - constraint involved in creating an expression representing an OR with this
Returns:
CspBooleanExpr representing the expression (this OR cons)

or

public CspBooleanExpr or(boolean val)
Creates a boolean expression resulting from oring a constant with this expression

Parameters:
val - the boolean involved in creating an expression representing an OR with this
Returns:
CspBooleanExpr representing the expression (this OR val)

or

public CspBooleanExpr or(CspGenericBooleanConstant val)
Creates a boolean expression resulting from oring a generic constant with this expression

Parameters:
val - the generic boolean involved in creating an expression representing an OR with this
Returns:
CspBooleanExpr representing the expression (this OR val)

implies

public CspBooleanExpr implies(CspBooleanExpr expr)
Creates a boolean expression resulting from this expression implying another expression

Parameters:
expr - expression that this expression will imply (this -> expr)
Returns:
CspBooleanExpr representing the expression (this -> expr)

implies

public CspBooleanExpr implies(boolean val)
Creates a boolean expression resulting from this expression implying a constant value

Parameters:
val - the boolean involved in creating an expression representing implication (this -> val)
Returns:
CspBooleanExpr representing the expression (this -> val)

implies

public CspBooleanExpr implies(CspGenericBooleanConstant val)
Creates a boolean expression resulting from this expression implying a generic constant value

Parameters:
val - the generic boolean involved in creating an expression representing implication (this -> val)
Returns:
CspBooleanExpr representing the expression (this -> val)

implies

public CspBooleanExpr implies(CspConstraint cons)
Creates a boolean expression resulting from this expression implying a constraint

Parameters:
cons - constraint involved in creating an expression representing implication (this -> cons)
Returns:
CspBooleanExpr representing the expression (this -> cons)

eq

public CspBooleanExpr eq(CspBooleanExpr expr)
Creates a boolean expression resulting from setting a boolean expression equal to this expression

Parameters:
expr - expression that this expression will be equal to
Returns:
CspBooleanExpr representing the expression (this == expr)

eq

public CspBooleanExpr eq(CspConstraint cons)
Creates a boolean expression resulting from setting a constraint equal to this expression

Parameters:
cons - constraint involved in creating an expression representing equality between this and a constraint
Returns:
CspBooleanExpr representing the expression (this == cons)

eq

public CspBooleanExpr eq(boolean val)
Creates a boolean expression resulting from setting a constant equal to this expression

Parameters:
val - the boolean involved in creating an expression representing equality
Returns:
CspBooleanExpr representing the expression (this == val)

isFalse

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

Returns:
true - boolean expression cannot be satisfied; false - boolean expression can potentially be satisfied

isTrue

public boolean isTrue()
Returns whether or not the expression is satisfied yet or not

Returns:
true - boolean expression cannot be dissatisfied; false - boolean expression can potentially be dissatisfied

toConstraint

public CspConstraint toConstraint()
Returns a constraint that represents this boolean expression that can be used in the solver

Returns:
constraint representing this boolean expression