Interface RuleLiteralData<R extends Rule>


  • public interface RuleLiteralData<R extends Rule>

    A wrapper for the literal components of a rule. These literal components can be:

    • Literal (String) conditions
    • (Optionally) The rule's RHS (action)

    During the build phase, these components are passed to a service that compiles each of them into Java method handles.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Collection<String> conditions()
      Returns literal conditions associated with this instance of `LiteralRuleSources`.
      R getRule()
      Returns the rule associated with this instance of `LiteralRuleSources`.
      String rhs()
      Returns the right-hand side (RHS) expression associated with this instance of LiteralRuleSources.
    • Method Detail

      • getRule

        R getRule()
        Returns the rule associated with this instance of `LiteralRuleSources`.
        Returns:
        the rule associated with this instance of `LiteralRuleSources`
      • conditions

        Collection<String> conditions()
        Returns literal conditions associated with this instance of `LiteralRuleSources`.
        Returns:
        the conditions associated with this instance of `LiteralRuleSources`
      • rhs

        String rhs()
        Returns the right-hand side (RHS) expression associated with this instance of LiteralRuleSources. The RHS expression represents the action or consequence of the rule.
        Returns:
        the RHS expression associated with this instance of LiteralRuleSources. Returns null if no RHS expression exists or if the RHS expression is represented by a functional interface.