Class FeatureFlagsState.Builder

    • Method Detail

      • add

        public FeatureFlagsState.Builder add​(java.lang.String flagKey,
                                             LDValue value,
                                             java.lang.Integer variationIndex,
                                             EvaluationReason reason,
                                             int flagVersion,
                                             boolean trackEvents,
                                             java.lang.Long debugEventsUntilDate)
        Adds data to the builder representing the result of a feature flag evaluation.

        The flagVersion, trackEvents, and debugEventsUntilDate parameters are normally generated internally by the SDK; they are used if the FeatureFlagsState data has been passed to front-end code, to control how analytics events are generated by the front end. If you are using this builder in back-end test code, those values are unimportant.

        Parameters:
        flagKey - the feature flag key
        value - the evaluated value
        variationIndex - the evaluated variation index
        reason - the evaluation reason
        flagVersion - the current flag version
        trackEvents - true if full event tracking is turned on for this flag
        debugEventsUntilDate - if set, event debugging is turned until this time (millisecond timestamp)
        Returns:
        the builder
      • add

        public FeatureFlagsState.Builder add​(java.lang.String flagKey,
                                             LDValue value,
                                             java.lang.Integer variationIndex,
                                             EvaluationReason reason,
                                             int flagVersion,
                                             boolean trackEvents,
                                             boolean trackReason,
                                             java.lang.Long debugEventsUntilDate)
        Adds data to the builder representing the result of a feature flag evaluation.

        The flagVersion, trackEvents, and debugEventsUntilDate parameters are normally generated internally by the SDK; they are used if the FeatureFlagsState data has been passed to front-end code, to control how analytics events are generated by the front end. If you are using this builder in back-end test code, those values are unimportant.

        Parameters:
        flagKey - the feature flag key
        value - the evaluated value
        variationIndex - the evaluated variation index
        reason - the evaluation reason
        flagVersion - the current flag version
        trackEvents - true if full event tracking is turned on for this flag
        trackReason - true if evaluation reasons must be included due to experimentation
        debugEventsUntilDate - if set, event debugging is turned until this time (millisecond timestamp)
        Returns:
        the builder