java.lang.Object
com._1c.g5.aef2.standard.definitions.rules.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 Details

    • MultiRule

      public MultiRule()
  • Method Details

    • 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
    • getResult

      public IRuleResult getResult(IRuleInput input)
      Description copied from interface: IRule
      Returns the result of the rule.
      Specified by:
      getResult in interface IRule
      Parameters:
      input - the input.
      Returns:
      the IRuleResult instance.