Package 

Class EvaluationContext


  • 
    public final class EvaluationContext
    
                        

    Represents the context used for evaluating feature flags.

    This context contains a targeting key and optional attributes that determine which flag values should be returned for a given user or session. The targeting key ensures consistent flag evaluation across requests for the same entity.

    • Method Detail

      • getTargetingKey

         final String getTargetingKey()

        The unique identifier used for targeting and bucketing flag evaluation.

        Must be consistent for the same entity to ensure consistent flag behavior across requests. Examples: user ID, company ID, device ID.

      • getAttributes

         final Map<String, String> getAttributes()

        Additional attributes used for targeting flag evaluation.

        All values must be strings. You are responsible for converting numbers, booleans, and other types to strings before passing them to the context.

        Example: mapOf("email" to "user@example.com", "age" to "25", "premium" to "true")