Package org.drools.ruleunits.api

## Interface RuleUnit<T extends RuleUnitData>

- Type Parameters:
    `T` - The `RuleUnitData` for which this rule unit is generated.

      public interface RuleUnit<T extends RuleUnitData>

  A rule unit is an atomic module defining a set of rules and a set of strongly typed `DataSource`s through which the facts processed by the rule engine are inserted. Users never need to implement this interface since the concrete implementation, reflecting what has been defined in the corresponding `RuleUnitData` is automatically generated by the engine. It is possible to obtain an instance of the generated rule unit programmatically via the `RuleUnitProvider` or declaratively via dependency injection.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `RuleUnitInstance<T>` | `createInstance​(T data)` | Creates a `RuleUnitInstance` using the given `RuleUnitData`.

- - ### Method Detail

    - #### createInstance

          RuleUnitInstance<T> createInstance​(T data)

      Creates a `RuleUnitInstance` using the given `RuleUnitData`.