Package growthbook.sdk.java
Class FeatureRule.FeatureRuleBuilder<ValueType>
java.lang.Object
growthbook.sdk.java.FeatureRule.FeatureRuleBuilder<ValueType>
- Enclosing class:
- FeatureRule<ValueType>
-
Method Summary
Modifier and TypeMethodDescriptionbucketVersion
(Integer bucketVersion) build()
condition
(com.google.gson.JsonObject condition) Optional targeting conditionWhat percent of users should be included in the experiment (between 0 and 1, inclusive)disableStickyBucketing
(Boolean disableStickyBucketing) fallbackAttribute
(String fallbackAttribute) Immediately force a specific value (ignore every other option besides condition and coverage)hashAttribute
(String hashAttribute) What user attribute should be used to assign variations (defaults to id)hashVersion
(Integer hashVersion) The hash version to use (default to 1)Unique feature rule idThe globally unique tracking key for the experiment (default to the feature key)meta
(ArrayList<VariationMeta> meta) Meta info about the experiment variationsminBucketVersion
(Integer minBucketVersion) Deprecated.parentConditions
(ArrayList<ParentCondition> parentConditions) Each item defines a prerequisite where a `condition` must evaluate against a parent feature's value (identified by `id`).range
(BucketRange range) A more precise version of coverageranges
(ArrayList<BucketRange> ranges) Ranges for experiment variationstoString()
variations
(ArrayList<ValueType> variations) Run an experiment (A/B test) and randomly choose between these variationsHow to weight traffic between variations.
-
Method Details
-
id
Unique feature rule id- Returns:
this
.
-
key
The globally unique tracking key for the experiment (default to the feature key)- Returns:
this
.
-
coverage
What percent of users should be included in the experiment (between 0 and 1, inclusive)- Returns:
this
.
-
force
Immediately force a specific value (ignore every other option besides condition and coverage)- Returns:
this
.
-
variations
public FeatureRule.FeatureRuleBuilder<ValueType> variations(@Nullable ArrayList<ValueType> variations) Run an experiment (A/B test) and randomly choose between these variations- Returns:
this
.
-
weights
How to weight traffic between variations. Must add to 1.- Returns:
this
.
-
namespace
@Deprecated public FeatureRule.FeatureRuleBuilder<ValueType> namespace(@Nullable Namespace namespace) Deprecated.A tuple that contains the namespace identifier, plus a range of coverage for the experiment.- Returns:
this
.
-
hashAttribute
What user attribute should be used to assign variations (defaults to id)- Returns:
this
.
-
condition
public FeatureRule.FeatureRuleBuilder<ValueType> condition(@Nullable com.google.gson.JsonObject condition) Optional targeting condition- Returns:
this
.
-
parentConditions
public FeatureRule.FeatureRuleBuilder<ValueType> parentConditions(@Nullable ArrayList<ParentCondition> parentConditions) Each item defines a prerequisite where a `condition` must evaluate against a parent feature's value (identified by `id`). If `gate` is true, then this is a blocking feature-level prerequisite; otherwise it applies to the current rule only.- Returns:
this
.
-
hashVersion
The hash version to use (default to 1)- Returns:
this
.
-
range
A more precise version of coverage- Returns:
this
.
-
ranges
Ranges for experiment variations- Returns:
this
.
-
meta
Meta info about the experiment variations- Returns:
this
.
-
filters
- Returns:
this
.
-
seed
- Returns:
this
.
-
name
- Returns:
this
.
-
phase
- Returns:
this
.
-
fallbackAttribute
public FeatureRule.FeatureRuleBuilder<ValueType> fallbackAttribute(@Nullable String fallbackAttribute) - Returns:
this
.
-
disableStickyBucketing
public FeatureRule.FeatureRuleBuilder<ValueType> disableStickyBucketing(@Nullable Boolean disableStickyBucketing) - Returns:
this
.
-
bucketVersion
- Returns:
this
.
-
minBucketVersion
public FeatureRule.FeatureRuleBuilder<ValueType> minBucketVersion(@Nullable Integer minBucketVersion) - Returns:
this
.
-
tracks
public FeatureRule.FeatureRuleBuilder<ValueType> tracks(@Nullable ArrayList<TrackData<ValueType>> tracks) - Returns:
this
.
-
build
-
toString
-