Class NotBoolVar

java.lang.Object
com.google.ortools.sat.NotBoolVar
All Implemented Interfaces:
LinearArgument, Literal

public final class NotBoolVar extends Object implements Literal
The negation of a boolean variable. This class should not be used directly, Literal must be used instead.
  • Constructor Details

    • NotBoolVar

      public NotBoolVar(BoolVar boolVar)
  • Method Details

    • getIndex

      public int getIndex()
      returns the index in the literal in the underlying CpModelProto.
      Specified by:
      getIndex in interface Literal
    • not

      public Literal not()
      Returns the negation of this literal.
      Specified by:
      not in interface Literal
    • build

      public LinearExpr build()
      Description copied from interface: LinearArgument
      Builds a linear expression.
      Specified by:
      build in interface LinearArgument
    • toString

      public String toString()
      Returns a short string describing this literal.
      Overrides:
      toString in class Object