org.eclipse.incquery.runtime.matchers.psystem

## Class BasePConstraint

- java.lang.Object
- - org.eclipse.incquery.runtime.matchers.psystem.BasePConstraint

- All Implemented Interfaces:
    PConstraint
  Direct Known Subclasses:
    DeferredPConstraint, EnumerablePConstraint

      public abstract class BasePConstraint
      extends java.lang.Object
      implements PConstraint

  Author:
    Gabor Bergmann

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.incquery.runtime.matchers.psystem.PConstraint

      `PConstraint.CompareByMonotonousID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BasePConstraint(PBody pBody, java.util.Set<PVariable> affectedVariables)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkSanity()`
    `void` | `delete()`
    `java.util.Set<PVariable>` | `getAffectedVariables()` All variables affected by this constraint.
    `java.util.Map<java.util.Set<PVariable>,java.util.Set<PVariable>>` | `getFunctionalDependencies(IQueryMetaContext context)` A (preferably minimal) cover of known functional dependencies between variables.
    `int` | `getMonotonousID()` Returns an integer ID that is guaranteed to increase strictly monotonously for constraints within a pBody.
    `PBody` | `getPSystem()`
    `void` | `replaceVariable(PVariable obsolete, PVariable replacement)`
    `java.lang.String` | `toString()`

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

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

    - ### Methods inherited from interface org.eclipse.incquery.runtime.matchers.psystem.PConstraint

      `getDeducedVariables`

- - ### Constructor Detail

    - #### BasePConstraint

          public BasePConstraint(PBody pBody,
                                 java.util.Set<PVariable> affectedVariables)

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getAffectedVariables

          public java.util.Set<PVariable> getAffectedVariables()

      Description copied from interface: `PConstraint`
      All variables affected by this constraint.
      Specified by:
        `getAffectedVariables` in interface `PConstraint`

    - #### getFunctionalDependencies

          public java.util.Map<java.util.Set<PVariable>,java.util.Set<PVariable>> getFunctionalDependencies(IQueryMetaContext context)

      Description copied from interface: `PConstraint`
      A (preferably minimal) cover of known functional dependencies between variables.
      Specified by:
        `getFunctionalDependencies` in interface `PConstraint`
      Returns:
        non-trivial functional dependencies in the form of {variables} --> {variables}, where dependencies with the same lhs are unified.

    - #### replaceVariable

          public void replaceVariable(PVariable obsolete,
                                      PVariable replacement)

      Specified by:
        `replaceVariable` in interface `PConstraint`

    - #### delete

          public void delete()

      Specified by:
        `delete` in interface `PConstraint`

    - #### checkSanity

          public void checkSanity()
                           throws QueryProcessingException

      Specified by:
        `checkSanity` in interface `PConstraint`
      Throws:
        `QueryProcessingException`

    - #### getPSystem

          public PBody getPSystem()

    - #### getMonotonousID

          public int getMonotonousID()

      Description copied from interface: `PConstraint`
      Returns an integer ID that is guaranteed to increase strictly monotonously for constraints within a pBody.
      Specified by:
        `getMonotonousID` in interface `PConstraint`