Package growthbook.sdk.java
Class ExperimentResult<ValueType>
java.lang.Object
growthbook.sdk.java.ExperimentResult<ValueType>
- Type Parameters:
ValueType
- generic type for the value type for this experiment's variations.
The result of an
GrowthBook.run(Experiment)
call-
Constructor Summary
-
Method Summary
-
Constructor Details
-
ExperimentResult
public ExperimentResult(@Nullable ValueType value, @Nullable Integer variationId, Boolean inExperiment, @Nullable String hashAttribute, @Nullable String hashValue, @Nullable String featureId, Boolean hashUsed, @Nullable String key, @Nullable String name, @Nullable Float bucket, @Nullable Boolean passThrough) The result of running anExperiment
given a specificGBContext
- Parameters:
value
- The array value of the assigned variationvariationId
- The array index of the assigned variationinExperiment
- Whether the user is part of the experiment or nothashAttribute
- The user attribute used to assign a variation (default: "id")hashValue
- The value of that attributefeatureId
- The id of the feature (if any) that the experiment came fromhashUsed
- If a hash was used to assign a variationkey
- The experiment key, if anyname
- The human-readable name of the assigned variationbucket
- The hash value used to assign a variation (float from 0 to 1)passThrough
- Used for holdout groups
-
-
Method Details
-
toJson
Serialized JSON string of theExperimentResult
- Returns:
- JSON string
-