Class NativeHistogramBuckets
Object
NativeHistogramBuckets
- All Implemented Interfaces:
Iterable<NativeHistogramBucket>
Immutable representation of native histogram buckets.
The bucket index defines the boundaries of the bucket, depending on the histogram's schema.
base = 2^(2^-schema)
lower bound = base^(index - 1)
upper bound = base^index
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuilder()intgetBucketIndex(int i) longgetCount(int i) iterator()static NativeHistogramBucketsof(int[] bucketIndexes, long[] counts) To create a newNativeHistogramBucketsinstance, you can either use one of the staticof(...)methods, or usebuilder().static NativeHistogramBucketsTo create a newNativeHistogramBucketsinstance, you can either use one of the staticof(...)methods, or usebuilder().intsize()stream()Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
EMPTY
-
-
Method Details
-
of
To create a newNativeHistogramBucketsinstance, you can either use one of the staticof(...)methods, or usebuilder().- Parameters:
bucketIndexes- see class javadoc ofNativeHistogramBuckets. May be empty.counts- must have the same length as bucketIndexes
-
of
To create a newNativeHistogramBucketsinstance, you can either use one of the staticof(...)methods, or usebuilder().- Parameters:
bucketIndexes- see class javadoc ofNativeHistogramBuckets. May be empty.counts- must have the same size as bucketIndexes
-
size
-
iterator
- Specified by:
iteratorin interfaceIterable<NativeHistogramBucket>
-
stream
-
getBucketIndex
-
getCount
-
builder
-