Class EvaluationContext

java.lang.Object
com.flagsmith.flagengine.EvaluationContext

@Generated("jsonschema2pojo") public class EvaluationContext extends Object
EvaluationContext

A context object containing the necessary information to evaluate Flagsmith feature flags.

  • Constructor Details

    • EvaluationContext

      public EvaluationContext()
      No args constructor for use in serialization
    • EvaluationContext

      public EvaluationContext(EvaluationContext source)
      Parameters:
      source - the object being copied
    • EvaluationContext

      public EvaluationContext(EnvironmentContext environment, IdentityContext identity, Segments segments, Features features)
      Parameters:
      environment - Environment context required for evaluation.
      identity - Identity context used for identity-based evaluation.
      segments - Segments. Segments applicable to the evaluation context.
      features - Features. Features to be evaluated in the context.
  • Method Details

    • getEnvironment

      public EnvironmentContext getEnvironment()
      EnvironmentContext

      Represents an environment context for feature flag evaluation. (Required)

    • setEnvironment

      public void setEnvironment(EnvironmentContext environment)
      EnvironmentContext

      Represents an environment context for feature flag evaluation. (Required)

    • withEnvironment

      public EvaluationContext withEnvironment(EnvironmentContext environment)
    • getIdentity

      public IdentityContext getIdentity()
      Identity context used for identity-based evaluation.
    • setIdentity

      public void setIdentity(IdentityContext identity)
      Identity context used for identity-based evaluation.
    • withIdentity

      public EvaluationContext withIdentity(IdentityContext identity)
    • getSegments

      public Segments getSegments()
      Segments

      Segments applicable to the evaluation context.

    • setSegments

      public void setSegments(Segments segments)
      Segments

      Segments applicable to the evaluation context.

    • withSegments

      public EvaluationContext withSegments(Segments segments)
    • getFeatures

      public Features getFeatures()
      Features

      Features to be evaluated in the context.

    • setFeatures

      public void setFeatures(Features features)
      Features

      Features to be evaluated in the context.

    • withFeatures

      public EvaluationContext withFeatures(Features features)
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
    • setAdditionalProperty

      public void setAdditionalProperty(String name, Object value)
    • withAdditionalProperty

      public EvaluationContext withAdditionalProperty(String name, Object value)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object