Interface RuleBuilder<C extends RuntimeContext<C>>

Type Parameters:
C - the type of the RuntimeContext of the builder
All Superinterfaces:
Environment, FluentEnvironment<RuleBuilder<C>>, LhsFactSelector<LhsBuilder<C>>, Named, NamedType.Resolver, Rule

public interface RuleBuilder<C extends RuntimeContext<C>> extends Rule, LhsFactSelector<LhsBuilder<C>>, FluentEnvironment<RuleBuilder<C>>
The RuleBuilder interface represents a builder for creating rules.
  • Method Details

    • getLhs

      LhsBuilder<C> getLhs()
      Returns the LhsBuilder instance.
      Returns:
      the LhsBuilder instance
    • salience

      RuleBuilder<C> salience(int salience)
      Sets the salience of the rule.
      Parameters:
      salience - the salience value of the rule
      Returns:
      a RuleBuilder instance
    • getRuntime

      C getRuntime()
      Returns the runtime context of this rule builder.
      Returns:
      the runtime object
    • execute

      RuleSetBuilder<C> execute()

      Terminates current rule builder as a rule without action.

      Returns:
      returns the current ruleset builder
    • execute

      RuleSetBuilder<C> execute(Consumer<RhsContext> consumer)

      Terminates current rule builder with the provided RHS action

      Parameters:
      consumer - RHS
      Returns:
      returns the current ruleset builder
    • execute

      RuleSetBuilder<C> execute(String literalRhs)

      Terminates current rule builder with the provided RHS action

      Parameters:
      literalRhs - RHS action as Java code
      Returns:
      returns the current ruleset builder
    • getConditionManager

      ConditionManager getConditionManager()
      Returns a non-fluent API for adding conditions and obtain their EvaluatorHandle handles.
      See Also: