Class RuleBuilder


  • public class RuleBuilder
    extends java.lang.Object
    Builder to create Rule instances.
    • Constructor Detail

      • RuleBuilder

        public RuleBuilder()
    • Method Detail

      • build

        public Rule build()
        Create a new Rule.
        Returns:
        a new rule instance
      • description

        public RuleBuilder description​(java.lang.String description)
        Set rule description.
        Parameters:
        description - of the rule
        Returns:
        the builder instance
      • name

        public RuleBuilder name​(java.lang.String name)
        Set rule name.
        Parameters:
        name - of the rule
        Returns:
        the builder instance
      • priority

        public RuleBuilder priority​(int priority)
        Set rule priority.
        Parameters:
        priority - of the rule
        Returns:
        the builder instance
      • then

        public RuleBuilder then​(Action action)
        Add an action to the rule.
        Parameters:
        action - to add
        Returns:
        the builder instance
      • when

        public RuleBuilder when​(Condition condition)
        Set rule condition.
        Parameters:
        condition - of the rule
        Returns:
        the builder instance