All Implemented Interfaces:
Constraint

public class Empty extends ConstraintAdapter
Checks if the parameter constraint cannot generate any candidate.
Author:
Ozgun Babur
  • Constructor Details

    • Empty

      public Empty(Constraint con)
      Constructor with the generative Constraint.
      Parameters:
      con - the generative Constraint
  • Method Details

    • getVariableSize

      public int getVariableSize()
      Variable size is one less than the wrapped Constraint.
      Specified by:
      getVariableSize in interface Constraint
      Overrides:
      getVariableSize in class ConstraintAdapter
      Returns:
      one less than the size of teh wrapped constraint
    • canGenerate

      public boolean canGenerate()
      Cannot generate
      Specified by:
      canGenerate in interface Constraint
      Overrides:
      canGenerate in class ConstraintAdapter
      Returns:
      false
    • satisfies

      public boolean satisfies(Match match, int... ind)
      Checks if the wrapped Constraint can generate any elements. This satisfies if it cannot.
      Specified by:
      satisfies in interface Constraint
      Overrides:
      satisfies in class ConstraintAdapter
      Parameters:
      match - current pattern match
      ind - mapped indices
      Returns:
      true if the wrapped Constraint generates nothing