Class BucketRange

java.lang.Object
growthbook.sdk.java.BucketRange

public class BucketRange extends Object
A tuple that describes a range of the number line between 0 and 1. The tuple has 2 parts, both floats - the start of the range and the end.
  • Constructor Details

    • BucketRange

      public BucketRange(Float rangeStart, Float rangeEnd)
  • Method Details

    • toJson

      public String toJson()
      Converts the bucket range to the serialized tuple
      Returns:
      JSON string of the bucket range
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getSerializer

      public static com.google.gson.JsonSerializer<BucketRange> getSerializer()
      Returns:
      serializer for BucketRange
    • getDeserializer

      public static com.google.gson.JsonDeserializer<BucketRange> getDeserializer()
      Returns:
      deserializer for BucketRange
    • builder

      public static BucketRange.BucketRangeBuilder builder()
    • getRangeStart

      public Float getRangeStart()
    • getRangeEnd

      public Float getRangeEnd()
    • setRangeStart

      public void setRangeStart(Float rangeStart)
    • setRangeEnd

      public void setRangeEnd(Float rangeEnd)