Class Feature<ValueType>

java.lang.Object
growthbook.sdk.java.Feature<ValueType>
Type Parameters:
ValueType - value type for the feature

public class Feature<ValueType> extends Object
The feature with a generic value type.
  • defaultValue (any) - The default value (should use null if not specified)
  • rules (FeatureRule[]) - Array of FeatureRule objects that determine when and how the defaultValue gets overridden
  • Constructor Details

    • Feature

      public Feature()
  • Method Details

    • getDefaultValue

      public Object getDefaultValue()
      The default value for a feature evaluation
      Returns:
      value of the feature
    • getRules

      @Nullable public ArrayList<FeatureRule<ValueType>> getRules()
      Returns the rules for evaluating the feature
      Returns:
      rules list