Package io.opencensus.metrics.export
Class Distribution.BucketOptions.ExplicitOptions
java.lang.Object
io.opencensus.metrics.export.Distribution.BucketOptions
io.opencensus.metrics.export.Distribution.BucketOptions.ExplicitOptions
- Direct Known Subclasses:
AutoValue_Distribution_BucketOptions_ExplicitOptions
- Enclosing class:
Distribution.BucketOptions
@Immutable
public abstract static class Distribution.BucketOptions.ExplicitOptions
extends Distribution.BucketOptions
A Bucket with explicit bounds
Distribution.BucketOptions
.-
Nested Class Summary
Nested classes/interfaces inherited from class io.opencensus.metrics.export.Distribution.BucketOptions
Distribution.BucketOptions.ExplicitOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
checkBucketBoundsAreSorted
(List<Double> bucketBoundaries) private static Distribution.BucketOptions.ExplicitOptions
Creates aDistribution.BucketOptions.ExplicitOptions
.Returns the bucket boundaries of this distribution.final <T> T
match
(Function<? super Distribution.BucketOptions.ExplicitOptions, T> explicitFunction, Function<? super Distribution.BucketOptions, T> defaultFunction) Applies the given match function to the underlying BucketOptions.Methods inherited from class io.opencensus.metrics.export.Distribution.BucketOptions
explicitOptions
-
Constructor Details
-
ExplicitOptions
ExplicitOptions()
-
-
Method Details
-
match
public final <T> T match(Function<? super Distribution.BucketOptions.ExplicitOptions, T> explicitFunction, Function<? super Distribution.BucketOptions, T> defaultFunction) Description copied from class:Distribution.BucketOptions
Applies the given match function to the underlying BucketOptions.- Specified by:
match
in classDistribution.BucketOptions
- Parameters:
explicitFunction
- the function that should be applied if the BucketOptions has typeExplicitOptions
.defaultFunction
- the function that should be applied if the BucketOptions has a type that was added after thismatch
method was added to the API. SeeFunctions
for some common functions for handling unknown types.- Returns:
- the result of the function applied to the underlying BucketOptions.
-
create
Creates aDistribution.BucketOptions.ExplicitOptions
.- Parameters:
bucketBoundaries
- the bucket boundaries of a distribution (given explicitly). The values must be strictly increasing and should be positive.- Returns:
- a
ExplicitOptions
. - Since:
- 0.17
-
checkBucketBoundsAreSorted
-
getBucketBoundaries
Returns the bucket boundaries of this distribution.- Returns:
- the bucket boundaries of this distribution.
- Since:
- 0.17
-