org.eclipse.viatra.transformation.evm.specific

## Class Rules

- java.lang.Object
- - org.eclipse.viatra.transformation.evm.specific.Rules

-     public final class Rules
      extends java.lang.Object

  Provides static methods acting on or generating a `RuleSpecification`.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <Match extends IPatternMatch> RuleSpecification<Match>` | `newMatcherRuleSpecification(IQuerySpecification<? extends ViatraQueryMatcher<Match>> querySpecification, ActivationLifeCycle lifecycle, java.util.Set<Job<Match>> jobs)` Creates a `RuleSpecification` with the given query specification, life-cycle and jobs.
    `static <Match extends IPatternMatch> RuleSpecification<Match>` | `newMatcherRuleSpecification(IQuerySpecification<? extends ViatraQueryMatcher<Match>> querySpecification, ActivationLifeCycle lifecycle, java.util.Set<Job<Match>> jobs, java.lang.String name)` Creates a `RuleSpecification` with the given query specification, life-cycle and jobs and name.
    `static <Match extends IPatternMatch> RuleSpecification<Match>` | `newMatcherRuleSpecification(IQuerySpecification<? extends ViatraQueryMatcher<Match>> querySpecification, java.util.Set<Job<Match>> jobs)` Creates a `RuleSpecification` with the given query specification and jobs, using the `DefaultActivationLifeCycle#DEFAULT` life-cycle.
    `static <Match extends IPatternMatch> RuleSpecification<Match>` | `newMatcherRuleSpecification(ViatraQueryMatcher<Match> matcher, ActivationLifeCycle lifecycle, java.util.Set<Job<Match>> jobs)`
    `static <Match extends IPatternMatch> RuleSpecification<Match>` | `newMatcherRuleSpecification(ViatraQueryMatcher<Match> matcher, ActivationLifeCycle lifecycle, java.util.Set<Job<Match>> jobs, java.lang.String name)`
    `static <Match extends IPatternMatch> EventFilter<Match>` | `newMultiMatchFilter(java.util.Collection<Match> filterMatches, ViatraQueryFilterSemantics semantics)` Creates a "multi" event filter that uses the IPatternMatch.isCompatibleWith to check event atoms against a collection of filter (partial) matches.
    `static <Match extends IPatternMatch> EventFilter<Match>` | `newSingleMatchFilter(Match filterMatch)` Creates an event filter that uses the IPatternMatch.isCompatibleWith to check event atoms.

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

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

- - ### Method Detail

    - #### newMatcherRuleSpecification

          public static <Match extends IPatternMatch> RuleSpecification<Match> newMatcherRuleSpecification(IQuerySpecification<? extends ViatraQueryMatcher<Match>> querySpecification,
                                                                                                           ActivationLifeCycle lifecycle,
                                                                                                           java.util.Set<Job<Match>> jobs)

      Creates a `RuleSpecification` with the given query specification, life-cycle and jobs. For default life-cycle implementations, see `DefaultActivationLifeCycle`.
      Parameters:
        `querySpecification` -
        `lifecycle` -
        `jobs` -

    - #### newMatcherRuleSpecification

          public static <Match extends IPatternMatch> RuleSpecification<Match> newMatcherRuleSpecification(IQuerySpecification<? extends ViatraQueryMatcher<Match>> querySpecification,
                                                                                                           ActivationLifeCycle lifecycle,
                                                                                                           java.util.Set<Job<Match>> jobs,
                                                                                                           java.lang.String name)

      Creates a `RuleSpecification` with the given query specification, life-cycle and jobs and name. For default life-cycle implementations, see `DefaultActivationLifeCycle`.
      Parameters:
        `querySpecification` -
        `lifecycle` -
        `jobs` -
        `name` -

    - #### newMatcherRuleSpecification

          public static <Match extends IPatternMatch> RuleSpecification<Match> newMatcherRuleSpecification(IQuerySpecification<? extends ViatraQueryMatcher<Match>> querySpecification,
                                                                                                           java.util.Set<Job<Match>> jobs)

      Creates a `RuleSpecification` with the given query specification and jobs, using the `DefaultActivationLifeCycle#DEFAULT` life-cycle.
      Parameters:
        `querySpecification` -
        `jobs` -

    - #### newMatcherRuleSpecification

          public static <Match extends IPatternMatch> RuleSpecification<Match> newMatcherRuleSpecification(ViatraQueryMatcher<Match> matcher,
                                                                                                           ActivationLifeCycle lifecycle,
                                                                                                           java.util.Set<Job<Match>> jobs)

    - #### newMatcherRuleSpecification

          public static <Match extends IPatternMatch> RuleSpecification<Match> newMatcherRuleSpecification(ViatraQueryMatcher<Match> matcher,
                                                                                                           ActivationLifeCycle lifecycle,
                                                                                                           java.util.Set<Job<Match>> jobs,
                                                                                                           java.lang.String name)

    - #### newSingleMatchFilter

          public static <Match extends IPatternMatch> EventFilter<Match> newSingleMatchFilter(Match filterMatch)

      Creates an event filter that uses the IPatternMatch.isCompatibleWith to check event atoms.

      Using the matches that are equal will result in equal filters.
      Parameters:
        `filterMatch` - non-null match to use for filtering
      Returns:
        the event filter

    - #### newMultiMatchFilter

          public static <Match extends IPatternMatch> EventFilter<Match> newMultiMatchFilter(java.util.Collection<Match> filterMatches,
                                                                                             ViatraQueryFilterSemantics semantics)

      Creates a "multi" event filter that uses the IPatternMatch.isCompatibleWith to check event atoms against a collection of filter (partial) matches. The possible semantics are documented in `ViatraQueryFilterSemantics`.
      Parameters:
        `filterMatches` - non-null match to use for filtering
        `semantics` - the filter semantics to use
      Returns:
        the event filter