Interface Treatment.Builder

  • Method Details

    • key

      The unique key that identifies this treatment.

      Parameters:
      key - The unique key that identifies this treatment.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • weight

      Treatment.Builder weight(Float weight)

      The traffic allocation weight for this treatment.

      Parameters:
      weight - The traffic allocation weight for this treatment.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • description

      Treatment.Builder description(String description)

      A description of the treatment.

      Parameters:
      description - A description of the treatment.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • flagValue

      Treatment.Builder flagValue(FlagValue flagValue)

      The feature flag value served to users assigned to this treatment.

      Parameters:
      flagValue - The feature flag value served to users assigned to this treatment.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • flagValue

      default Treatment.Builder flagValue(Consumer<FlagValue.Builder> flagValue)

      The feature flag value served to users assigned to this treatment.

      This is a convenience method that creates an instance of the FlagValue.Builder avoiding the need to create one manually via FlagValue.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to flagValue(FlagValue).

      Parameters:
      flagValue - a consumer that will call methods on FlagValue.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: