Class FeatureRule<ValueType>

java.lang.Object
growthbook.sdk.java.FeatureRule<ValueType>
Type Parameters:
ValueType - generic type for the value type for this experiment's variations.

public class FeatureRule<ValueType> extends Object
Overrides the defaultValue of a Feature based on a set of requirements. Has a number of optional properties
  • condition (Condition) - Optional targeting condition
  • coverage (number) - What percent of users should be included in the experiment (between 0 and 1, inclusive)
  • force (any) - Immediately force a specific value (ignore every other option besides condition and coverage)
  • variations (any[]) - Run an experiment (A/B test) and randomly choose between these variations
  • key (string) - The globally unique tracking key for the experiment (default to the feature key)
  • weights (number[]) - How to weight traffic between variations. Must add to 1.
  • namespace (Namespace) - Adds the experiment to a namespace
  • hashAttribute (string) - What user attribute should be used to assign variations (defaults to id)
  • Constructor Details

    • FeatureRule

      public FeatureRule()