Class RuleEvaluator

    • Constructor Detail

      • RuleEvaluator

        public RuleEvaluator()
    • Method Detail

      • evaluate

        public static Value evaluate​(EndpointRuleSet ruleset,
                                     java.util.Map<Identifier,​Value> parameterArguments)
        Initializes a new RuleEvaluator instances, and evaluates the provided ruleset and parameter arguments.
        Parameters:
        ruleset - The endpoint ruleset.
        parameterArguments - The rule-set parameter identifiers and values to evaluate the rule-set against.
        Returns:
        The resulting value from the final matched rule.
      • evaluateRuleSet

        public Value evaluateRuleSet​(EndpointRuleSet ruleset,
                                     java.util.Map<Identifier,​Value> parameterArguments)
        Evaluate the provided ruleset and parameter arguments.
        Parameters:
        ruleset - The endpoint ruleset.
        parameterArguments - The rule-set parameter identifiers and values to evaluate the rule-set against.
        Returns:
        The resulting value from the final matched rule.
      • evaluateCondition

        public Value evaluateCondition​(Condition condition)
        Evaluates the given condition in the current scope.
        Parameters:
        condition - the condition to evaluate.
        Returns:
        the value returned by the condition.