Package com.flagsmith.flagengine
Class EvaluationContext
java.lang.Object
com.flagsmith.flagengine.EvaluationContext
EvaluationContext
A context object containing the necessary information to evaluate Flagsmith feature flags.
-
Constructor Summary
ConstructorsConstructorDescriptionNo args constructor for use in serializationEvaluationContext(EnvironmentContext environment, IdentityContext identity, Segments segments, Features features) EvaluationContext(EvaluationContext source) -
Method Summary
Modifier and TypeMethodDescriptionbooleanEnvironmentContextFeaturesIdentity context used for identity-based evaluation.SegmentsinthashCode()voidsetAdditionalProperty(String name, Object value) voidsetEnvironment(EnvironmentContext environment) EnvironmentContextvoidsetFeatures(Features features) FeaturesvoidsetIdentity(IdentityContext identity) Identity context used for identity-based evaluation.voidsetSegments(Segments segments) SegmentstoString()withAdditionalProperty(String name, Object value) withEnvironment(EnvironmentContext environment) withFeatures(Features features) withIdentity(IdentityContext identity) withSegments(Segments segments)
-
Constructor Details
-
EvaluationContext
public EvaluationContext()No args constructor for use in serialization -
EvaluationContext
- 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
EnvironmentContextRepresents an environment context for feature flag evaluation. (Required)
-
setEnvironment
EnvironmentContextRepresents an environment context for feature flag evaluation. (Required)
-
withEnvironment
-
getIdentity
Identity context used for identity-based evaluation. -
setIdentity
Identity context used for identity-based evaluation. -
withIdentity
-
getSegments
SegmentsSegments applicable to the evaluation context.
-
setSegments
SegmentsSegments applicable to the evaluation context.
-
withSegments
-
getFeatures
FeaturesFeatures to be evaluated in the context.
-
setFeatures
FeaturesFeatures to be evaluated in the context.
-
withFeatures
-
getAdditionalProperties
-
setAdditionalProperty
-
withAdditionalProperty
-
toString
-
hashCode
public int hashCode() -
equals
-