Class MultiRule

  • All Implemented Interfaces:
    IRule

    public class MultiRule
    extends Object
    implements IRule
    A rule implementing a list of IRules. Its rule result is a simple set union of corresponding sets of hidden and disabled definitions returned by underlying rules, hence the order of adding rules is not important.
    • Constructor Detail

      • MultiRule

        public MultiRule()
    • Method Detail

      • of

        public static MultiRule of​(IRule rule)
        Transforms a given IRule into a MultiRule. In case the rule is already a MultiRule, returns it with no changes. Otherwise, a new MultiRule will be created with the given rule as its single underlying rule.
        Parameters:
        rule - The rule to transform into MultiRule
        Returns:
        The rule transformed into MultiRule
      • add

        public MultiRule add​(IRule rule)
        Adds a rule to the list of underlying rules.
        Parameters:
        rule - The rule to be added
        Returns:
        The multirule itself for chaining