All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hubspot.chrome.devtools.client.core.browser.Bucket Maven / Gradle / Ivy

package com.hubspot.chrome.devtools.client.core.browser;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Chrome histogram bucket.
 */
public final class Bucket {
  private Integer low;

  private Integer high;

  private Integer count;

  @JsonCreator
  public Bucket(@JsonProperty("low") Integer low, @JsonProperty("high") Integer high,
      @JsonProperty("count") Integer count) {
    this.low = low;
    this.high = high;
    this.count = count;
  }

  public Integer getLow() {
    return low;
  }

  public Integer getHigh() {
    return high;
  }

  public Integer getCount() {
    return count;
  }

  public static Bucket.Builder builder() {
    return new Bucket.Builder();
  }

  public static final class Builder {
    private Integer low;

    private Integer high;

    private Integer count;

    private Builder() {
    }

    public Bucket.Builder setLow(Integer low) {
      this.low = low;
      return this;
    }

    public Bucket.Builder setHigh(Integer high) {
      this.high = high;
      return this;
    }

    public Bucket.Builder setCount(Integer count) {
      this.count = count;
      return this;
    }

    public Bucket build() {
      return new Bucket(low, high, count);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy