com.hubspot.chrome.devtools.client.core.browser.Histogram Maven / Gradle / Ivy
package com.hubspot.chrome.devtools.client.core.browser;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/**
* Chrome histogram.
*/
public final class Histogram {
private String name;
private Integer sum;
private Integer count;
private List buckets;
@JsonCreator
public Histogram(@JsonProperty("name") String name, @JsonProperty("sum") Integer sum,
@JsonProperty("count") Integer count, @JsonProperty("buckets") List buckets) {
this.name = name;
this.sum = sum;
this.count = count;
this.buckets = buckets;
}
public String getName() {
return name;
}
public Integer getSum() {
return sum;
}
public Integer getCount() {
return count;
}
public List getBuckets() {
return buckets;
}
public static Histogram.Builder builder() {
return new Histogram.Builder();
}
public static final class Builder {
private String name;
private Integer sum;
private Integer count;
private List buckets;
private Builder() {
}
public Histogram.Builder setName(String name) {
this.name = name;
return this;
}
public Histogram.Builder setSum(Integer sum) {
this.sum = sum;
return this;
}
public Histogram.Builder setCount(Integer count) {
this.count = count;
return this;
}
public Histogram.Builder setBuckets(List buckets) {
this.buckets = buckets;
return this;
}
public Histogram build() {
return new Histogram(name, sum, count, buckets);
}
}
}