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
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
int
getBucketIndex
(int i) long
getCount
(int i) iterator()
static NativeHistogramBuckets
of
(int[] bucketIndexes, long[] counts) To create a newNativeHistogramBuckets
instance, you can either use one of the staticof(...)
methods, or usebuilder()
.static NativeHistogramBuckets
To create a newNativeHistogramBuckets
instance, you can either use one of the staticof(...)
methods, or usebuilder()
.int
size()
stream()
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
EMPTY
-
-
Method Details
-
of
To create a newNativeHistogramBuckets
instance, 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 newNativeHistogramBuckets
instance, 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:
iterator
in interfaceIterable<NativeHistogramBucket>
-
stream
-
getBucketIndex
-
getCount
-
builder
-