Class ClassicHistogramBuckets
Object
ClassicHistogramBuckets
- All Implemented Interfaces:
Iterable<ClassicHistogramBucket>
Immutable container for histogram buckets with fixed bucket boundaries. Note that the counts are
not cumulative.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ClassicHistogramBuckets
Used in native histograms to indicate that no classic histogram buckets are present. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
To create newClassicHistogramBuckets
, you can either use one of the staticof(...)
methods, or usebuilder()
.long
getCount
(int i) The count is not cumulative.double
getUpperBound
(int i) boolean
isEmpty()
iterator()
static ClassicHistogramBuckets
of
(double[] upperBounds, long[] counts) To create newClassicHistogramBuckets
, you can either use one of the staticof(...)
methods, or usebuilder()
.static ClassicHistogramBuckets
To create newClassicHistogramBuckets
, you can either use one of the staticof(...)
methods, or usebuilder()
.static ClassicHistogramBuckets
To create newClassicHistogramBuckets
, 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
Used in native histograms to indicate that no classic histogram buckets are present.
-
-
Method Details
-
of
To create newClassicHistogramBuckets
, you can either use one of the staticof(...)
methods, or usebuilder()
.This method will create a copy of upperBounds and counts.
- Parameters:
upperBounds
- must have the same length as counts. Must not contain duplicates. Must contain at leastDouble.POSITIVE_INFINITY
for the+Inf
bucket. An upper bound must not beDouble.NaN
. The upperBounds array does not need to be sorted.counts
- must have the same length asupperBounds
. The entry at indexi
is the count for theupperBounds
at indexi
. For each count,Number.longValue()
is called to get the value. Counts are not cumulative. Counts must not be negative.
-
of
To create newClassicHistogramBuckets
, you can either use one of the staticof(...)
methods, or usebuilder()
.This method will create a copy of upperBounds and counts.
- Parameters:
upperBounds
- must have the same length as counts. Must not contain duplicates. Must contain at leastDouble.POSITIVE_INFINITY
for the+Inf
bucket. An upper bound must not beDouble.NaN
. The upperBounds array does not need to be sorted.counts
- must have the same length asupperBounds
. The entry at indexi
is the count for theupperBounds
at indexi
. For each count,Number.longValue()
is called to get the value. Counts are not cumulative. Counts must not be negative.
-
of
To create newClassicHistogramBuckets
, you can either use one of the staticof(...)
methods, or usebuilder()
.This method will create a copy of upperBounds and counts.
- Parameters:
upperBounds
- must have the same length as counts. Must not contain duplicates. Must contain at leastDouble.POSITIVE_INFINITY
for the+Inf
bucket. An upper bound must not beDouble.NaN
. The upperBounds array does not need to be sorted.counts
- must have the same length asupperBounds
. The entry at indexi
is the count for theupperBounds
at indexi
. Counts are not cumulative. Counts must not be negative.
-
size
-
getUpperBound
-
getCount
The count is not cumulative. -
isEmpty
-
iterator
- Specified by:
iterator
in interfaceIterable<ClassicHistogramBucket>
-
stream
-
builder
To create newClassicHistogramBuckets
, you can either use one of the staticof(...)
methods, or usebuilder()
.
-