Interface EvaluatorInterface


  • public interface EvaluatorInterface
    An Evaluator is able to calculate evaluation results for flags against the provided context.
    • Method Detail

      • evalAndFlag

        com.launchdarkly.sdk.server.EvalResultAndFlag evalAndFlag​(java.lang.String method,
                                                                  java.lang.String flagKey,
                                                                  LDContext context,
                                                                  LDValue defaultValue,
                                                                  LDValueType requireType,
                                                                  com.launchdarkly.sdk.server.EvaluationOptions options)
        Evaluates the provided flag.
        Parameters:
        method - the top level customer facing method that led to this invocation
        flagKey - of the flag that will be evaluated
        context - to use during the evaluation
        defaultValue - the value that will be returned in the result if an issue prevents the evaluator from successfully calculating an evaluation result.
        requireType - that will be asserted against the evaluator's result. If the assertion fails, the default value is used in the returned result.
        options - that are used to control more specific behavior of the evaluation
        Returns:
        the evaluation result and flag object