All Implemented Interfaces:
Constraint

public class Type extends ConstraintAdapter
Checks if a variable is a specific type or its subclass.
Author:
Ozgun Babur
  • Constructor Details

    • Type

      public Type(Class<? extends BioPAXElement> clazz)
      Constructor with the desired class.
      Parameters:
      clazz - desired class
  • Method Details

    • satisfies

      public boolean satisfies(Match match, int... ind)
      Checks if the element is assignable to a variable of the desired type.
      Specified by:
      satisfies in interface Constraint
      Overrides:
      satisfies in class ConstraintAdapter
      Parameters:
      match - current pattern match
      ind - mapped indices
      Returns:
      true if the element is assignable to a variable of the desired type