org.eclipse.incquery.runtime.evm.api

## Class RuleBase

- java.lang.Object
- - org.eclipse.incquery.runtime.evm.api.RuleBase

-     public class RuleBase
      extends java.lang.Object

  An RuleBase is associated to an `EventRealm` and it is responsible for creating, managing and disposing rules in the Rule Engine. It provides an unmodifiable view for the collection of applicable activations.
  Author:
    Tamas Szabo

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ScopedConflictSet` | `createScopedConflictSet(ConflictResolver conflictResolver, com.google.common.collect.Multimap<RuleSpecification<?>,EventFilter<?>> specifications)` Creates a scoped conflict set of the enabled activations of the provided rule specifications and filters using the given conflict resolver.
    `Agenda` | `getAgenda()`
    `EventRealm` | `getEventRealm()`
    `<EventAtom> RuleInstance<EventAtom>` | `getInstance(RuleSpecification<EventAtom> specification, EventFilter<? super EventAtom> filter)` Returns the filtered instance managed by the RuleBase for the given specification.
    `org.apache.log4j.Logger` | `getLogger()`
    `java.util.Set<RuleInstance<?>>` | `getRuleInstances()`
    `com.google.common.collect.Multimap<RuleSpecification<?>,EventFilter<?>>` | `getRuleSpecificationMultimap()`

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

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

- - ### Method Detail

    - #### getEventRealm

          public EventRealm getEventRealm()

      Returns:
        the eventRealm

    - #### getRuleSpecificationMultimap

          public com.google.common.collect.Multimap<RuleSpecification<?>,EventFilter<?>> getRuleSpecificationMultimap()

    - #### getRuleInstances

          public java.util.Set<RuleInstance<?>> getRuleInstances()

      Returns:
        an immutable copy of the set of rule instances

    - #### getInstance

          public <EventAtom> RuleInstance<EventAtom> getInstance(RuleSpecification<EventAtom> specification,
                                                                 EventFilter<? super EventAtom> filter)

      Returns the filtered instance managed by the RuleBase for the given specification.
      Parameters:
        `specification` -
        `filter` - the partial match to be used as filter
      Returns:
        the instance, if it exists, null otherwise

    - #### createScopedConflictSet

          public ScopedConflictSet createScopedConflictSet(ConflictResolver conflictResolver,
                                                           com.google.common.collect.Multimap<RuleSpecification<?>,EventFilter<?>> specifications)

      Creates a scoped conflict set of the enabled activations of the provided rule specifications and filters using the given conflict resolver. The set will be incrementally updated until disposed.
      Parameters:
        `conflictResolver` -
        `specifications` -

    - #### getAgenda

          public Agenda getAgenda()

      Returns:
        the agenda

    - #### getLogger

          public org.apache.log4j.Logger getLogger()

      Returns:
        the logger