Package org.eclipse.viatra.query.runtime.matchers.psystem

## Class PVariable

- java.lang.Object
- - org.eclipse.viatra.query.runtime.matchers.psystem.PVariable

-     public class PVariable
      extends java.lang.Object

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `PVariable` | `getDirectUnifiedInto()` |
    `java.lang.String` | `getName()` |
    `java.util.Set<PConstraint>` | `getReferringConstraints()` |
    `<ConstraintType> java.util.Set<ConstraintType>` | `getReferringConstraintsOfType​(java.lang.Class<ConstraintType> constraintClass)` |
    `PVariable` | `getUnifiedIntoRoot()` |
    `boolean` | `isDeducable()` | Determines whether there are any constraints that can deduce this variable
    `boolean` | `isUnique()` |
    `boolean` | `isVirtual()` |
    `void` | `refer​(PConstraint constraint)` | Register that this variable is referred by the given constraint.
    `java.lang.String` | `toString()` |
    `void` | `unifyInto​(PVariable replacement)` | Replaces this variable with a given other, resulting in their unification.
    `void` | `unrefer​(PConstraint constraint)` | Register that this variable is no longer referred by the given constraint.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 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()