Package com.google.ortools.sat
Class NotBoolVar
- java.lang.Object
-
- com.google.ortools.sat.NotBoolVar
-
- All Implemented Interfaces:
LinearArgument,Literal
public final class NotBoolVar extends java.lang.Object implements Literal
The negation of a boolean variable. This class should not be used directly, Literal must be used instead.
-
-
Constructor Summary
Constructors Constructor Description NotBoolVar(BoolVar boolVar)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LinearExprbuild()Builds a linear expression.intgetIndex()returns the index in the literal in the underlying CpModelProto.Literalnot()Returns the negation of this literal.java.lang.StringtoString()Returns a short string describing this literal.
-
-
-
Constructor Detail
-
NotBoolVar
public NotBoolVar(BoolVar boolVar)
-
-
Method Detail
-
getIndex
public int getIndex()
returns the index in the literal in the underlying CpModelProto.
-
not
public Literal not()
Returns the negation of this literal.
-
build
public LinearExpr build()
Description copied from interface:LinearArgumentBuilds a linear expression.- Specified by:
buildin interfaceLinearArgument
-
toString
public java.lang.String toString()
Returns a short string describing this literal.- Overrides:
toStringin classjava.lang.Object
-
-