Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit 728a81b

Browse files
prepare 5.6.2 release (#245)
1 parent 7ac827f commit 728a81b

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/main/java/com/launchdarkly/sdk/server/FeatureFlagsState.java

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,23 @@ public Builder valid(boolean valid) {
189189
return this;
190190
}
191191

192+
/**
193+
* Adds data to the builder representing the result of a feature flag evaluation.
194+
* <p>
195+
* The {@code flagVersion}, {@code trackEvents}, and {@code debugEventsUntilDate} parameters are
196+
* normally generated internally by the SDK; they are used if the {@link FeatureFlagsState} data
197+
* has been passed to front-end code, to control how analytics events are generated by the front
198+
* end. If you are using this builder in back-end test code, those values are unimportant.
199+
*
200+
* @param flagKey the feature flag key
201+
* @param value the evaluated value
202+
* @param variationIndex the evaluated variation index
203+
* @param reason the evaluation reason
204+
* @param flagVersion the current flag version
205+
* @param trackEvents true if full event tracking is turned on for this flag
206+
* @param debugEventsUntilDate if set, event debugging is turned until this time (millisecond timestamp)
207+
* @return the builder
208+
*/
192209
public Builder add(
193210
String flagKey,
194211
LDValue value,
@@ -225,7 +242,12 @@ Builder addFlag(DataModel.FeatureFlag flag, Evaluator.EvalResult eval) {
225242
);
226243
}
227244

228-
FeatureFlagsState build() {
245+
/**
246+
* Returns an object created from the builder state.
247+
*
248+
* @return an immutable {@link FeatureFlagsState}
249+
*/
250+
public FeatureFlagsState build() {
229251
return new FeatureFlagsState(flagMetadata.build(), valid);
230252
}
231253
}

0 commit comments

Comments
 (0)