All Implemented Interfaces:
Constraint

public class NOT extends ConstraintAdapter
Negation of a constraint. This is not generative.
Author:
Ozgun Babur
  • Constructor Details

    • NOT

      public NOT(Constraint con)
      Constructor with the wrapped constraint.
      Parameters:
      con - constraint to negate
  • Method Details

    • getVariableSize

      public int getVariableSize()
      Size is equal to the of the negated constraint
      Specified by:
      getVariableSize in interface Constraint
      Overrides:
      getVariableSize in class ConstraintAdapter
      Returns:
      size of the wrapped constraint
    • satisfies

      public boolean satisfies(Match match, int... ind)
      Negates the satisfies value of the wrapped constraint.
      Specified by:
      satisfies in interface Constraint
      Overrides:
      satisfies in class ConstraintAdapter
      Parameters:
      match - current pattern match
      ind - mapped indices
      Returns:
      negated value