Class PVariable


  • public class PVariable
    extends java.lang.Object
    • Method Detail

      • unifyInto

        public void unifyInto​(PVariable replacement)
        Replaces this variable with a given other, resulting in their unification. This variable will no longer be unique.
        Parameters:
        replacement -
      • isDeducable

        public boolean isDeducable()
        Determines whether there are any constraints that can deduce this variable
      • refer

        public void refer​(PConstraint constraint)
        Register that this variable is referred by the given constraint.
        Parameters:
        constraint -
      • unrefer

        public void unrefer​(PConstraint constraint)
        Register that this variable is no longer referred by the given constraint.
        Parameters:
        constraint -
      • getName

        public java.lang.String getName()
        Returns:
        the name of the pattern variable. This is the unique key of the pattern node.
      • isVirtual

        public boolean isVirtual()
        Returns:
        the virtual
      • getReferringConstraints

        public java.util.Set<PConstraint> getReferringConstraints()
        Returns:
        the referringConstraints
      • getReferringConstraintsOfType

        public <ConstraintType> java.util.Set<ConstraintType> getReferringConstraintsOfType​(java.lang.Class<ConstraintType> constraintClass)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getDirectUnifiedInto

        public PVariable getDirectUnifiedInto()
      • getUnifiedIntoRoot

        public PVariable getUnifiedIntoRoot()
      • isUnique

        public boolean isUnique()