Class ImmutableHistogram.Builder<T>

  • Type Parameters:
    T - The type of value counted by the ImmutableHistogram that this Builder will make.
    Enclosing class:
    ImmutableHistogram<T>

    public abstract static class ImmutableHistogram.Builder<T>
    extends Object
    An object that can be used to create an ImmutableHistogram.
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • setCountByBucket

        public ImmutableHistogram.Builder<T> setCountByBucket​(List<Long> countByBucket)
        Set the count of values per bucket, all at once. This list's size defines the number of buckets of the histogram.
        Parameters:
        countByBucket - The list of value-counts, in ascending bucket-index order.
        Returns:
        A builder that can be used to finish creating an ImmutableHistogram instance.
      • setBucketUpperBounds

        public ImmutableHistogram.Builder<T> setBucketUpperBounds​(List<T> bucketUpperBounds)
        Set the upper bounds of each of the buckets that has an upper bound, all at once. This list's size must be one less than the size of the list provided to setCountByBucket(List).
        Parameters:
        bucketUpperBounds - The list of bucket upper bounds, in ascending bucket-index order.
        Returns:
        A builder that can be used to finish creating an ImmutableHistogram instance.