org.eclipse.viatra.cep.core.api.rules

## Class DefaultCepRule

- java.lang.Object
- - org.eclipse.viatra.cep.core.api.rules.DefaultCepRule

- All Implemented Interfaces:
    ICepRule

      public class DefaultCepRule
      extends java.lang.Object
      implements ICepRule

  Default implementation of the `ICepRule` interface.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultCepRule(java.util.List<EventPattern> eventPatterns)` Creates a new rule with the specified `EventPattern`s and a default `CepJob`.
    `DefaultCepRule(java.util.List<EventPattern> eventPatterns, CepJob<IObservableComplexEventPattern> job)` Creates a new rule with the specified `EventPattern`s and `CepJob`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addEventPattern(EventPattern eventPattern)` Associates a single `EventPattern` with the rule.
    `void` | `addEventPatterns(java.util.List<EventPattern> eventPatterns)` Associates a list of `EventPattern`s with the rule.
    `java.util.List<EventPattern>` | `getEventPatterns()`
    `CepJob<IObservableComplexEventPattern>` | `getJob()`

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

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

- - ### Constructor Detail

    - #### DefaultCepRule

          public DefaultCepRule(java.util.List<EventPattern> eventPatterns,
                                CepJob<IObservableComplexEventPattern> job)

      Creates a new rule with the specified `EventPattern`s and `CepJob`.
      Parameters:
        `eventPatterns` - the `EventPattern`s the rule should be activated upon
        `job` - the `CepJob` to be executed when patterns get matched

    - #### DefaultCepRule

          public DefaultCepRule(java.util.List<EventPattern> eventPatterns)

      Creates a new rule with the specified `EventPattern`s and a default `CepJob`.
      Parameters:
        `eventPatterns` - the `EventPattern`s the rule should be activated upon

  - ### Method Detail

    - #### addEventPatterns

          public void addEventPatterns(java.util.List<EventPattern> eventPatterns)

      Associates a list of `EventPattern`s with the rule.
      Parameters:
        `eventPatterns` - the patterns to be included into the rule

    - #### addEventPattern

          public void addEventPattern(EventPattern eventPattern)

      Associates a single `EventPattern` with the rule.
      Parameters:
        `eventPattern` - the pattern to be included into the rule

    - #### getEventPatterns

          public java.util.List<EventPattern> getEventPatterns()

      Specified by:
        `getEventPatterns` in interface `ICepRule`
      Returns:
        the `EventPattern`s of the rule

    - #### getJob

          public CepJob<IObservableComplexEventPattern> getJob()

      Specified by:
        `getJob` in interface `ICepRule`
      Returns:
        the `CepJob` to be executed when patterns get matched