Class RuleDescrBuilderImpl

    • Constructor Detail

    • Method Detail

      • name

        public RuleDescrBuilder name​(java.lang.String name)
        Description copied from interface: RuleDescrBuilder
        The name of the rule. Best practice is to keep rule names relatively short, i.e. under 60 characters.
        Specified by:
        name in interface RuleDescrBuilder
        Parameters:
        name - name of the rule
        Returns:
        itself
      • extendsRule

        public RuleDescrBuilder extendsRule​(java.lang.String name)
        Description copied from interface: RuleDescrBuilder
        Defines the name of the rule this rule extends. It will cause the rule to inherit the LHS from the parent rule.
        Specified by:
        extendsRule in interface RuleDescrBuilder
        Parameters:
        name - name of the parent rule
        Returns:
        itself
      • rhs

        public RuleDescrBuilder rhs​(java.lang.String rhs)
        Description copied from interface: RuleDescrBuilder
        The default right hand side (consequence) of the rule. This is a code block that must be valid according to the used dialect (java or MVEL). In particular, the deprecated '#' character, that was used for one line comments is not supported. For one line comments, please use standard '//'.
        Specified by:
        rhs in interface RuleDescrBuilder
        Parameters:
        rhs - the code block
        Returns:
        itself
      • namedRhs

        public RuleDescrBuilder namedRhs​(java.lang.String name,
                                         java.lang.String rhs)
        Description copied from interface: RuleDescrBuilder
        An additional named right hand side (consequence) of the rule. This is a code block that must be valid according to the used dialect (java or MVEL). In particular, the deprecated '#' character, that was used for one line comments is not supported. For one line comments, please use standard '//'.
        Specified by:
        namedRhs in interface RuleDescrBuilder
        Parameters:
        name - the name of the consequence
        rhs - the code block
        Returns:
        itself