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

## Class PDisjunction

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

-     public class PDisjunction
      extends java.lang.Object

  A disjunction is a set of bodies representing separate conditions. A `PQuery` has a single, canonical PDisjunction, that can be replaced using rewriter

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PDisjunction​(java.util.Set<PBody> bodies)` |
    `PDisjunction​(PQuery query, java.util.Set<PBody> bodies)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.util.Set<PQuery>` | `getAllReferredQueries()` | Returns all queries required to evaluate this query (transitively).
    `java.util.Set<PBody>` | `getBodies()` | Returns an immutable set of bodies that consists of this disjunction
    `java.util.Set<PQuery>` | `getDirectReferredQueries()` | Returns all queries directly referred in the constraints.
    `PQuery` | `getQuery()` | Returns the corresponding query specification.
    `boolean` | `isMutable()` | Decides whether a disjunction is mutable.

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

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

- - ### Constructor Detail

    - #### PDisjunction

          public PDisjunction​(java.util.Set<PBody> bodies)

    - #### PDisjunction

          public PDisjunction​(PQuery query,
                              java.util.Set<PBody> bodies)

  - ### Method Detail

    - #### getBodies

          public java.util.Set<PBody> getBodies()

      Returns an immutable set of bodies that consists of this disjunction
      Returns:
        the bodies

    - #### getQuery

          public PQuery getQuery()

      Returns the corresponding query specification. May be null if not set.

    - #### getDirectReferredQueries

          public java.util.Set<PQuery> getDirectReferredQueries()

      Returns all queries directly referred in the constraints. They are all required to evaluate this query
      Returns:
        a non-null, but possibly empty list of query definitions

    - #### getAllReferredQueries

          public java.util.Set<PQuery> getAllReferredQueries()

      Returns all queries required to evaluate this query (transitively).
      Returns:
        a non-null, but possibly empty list of query definitions

    - #### isMutable

          public boolean isMutable()

      Decides whether a disjunction is mutable. A disjunction is mutable if all its contained bodies are mutable.