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 boundsDistribution.BucketOptions
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.opencensus.metrics.export.Distribution.BucketOptions
Distribution.BucketOptions.ExplicitOptions
-
-
Constructor Summary
Constructors Constructor Description ExplicitOptions()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private static void
checkBucketBoundsAreSorted(java.util.List<java.lang.Double> bucketBoundaries)
private static Distribution.BucketOptions.ExplicitOptions
create(java.util.List<java.lang.Double> bucketBoundaries)
Creates aDistribution.BucketOptions.ExplicitOptions
.abstract java.util.List<java.lang.Double>
getBucketBoundaries()
Returns the bucket boundaries of this distribution.<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
-
-
-
-
Method Detail
-
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
private static Distribution.BucketOptions.ExplicitOptions create(java.util.List<java.lang.Double> bucketBoundaries)
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
private static void checkBucketBoundsAreSorted(java.util.List<java.lang.Double> bucketBoundaries)
-
getBucketBoundaries
public abstract java.util.List<java.lang.Double> getBucketBoundaries()
Returns the bucket boundaries of this distribution.- Returns:
- the bucket boundaries of this distribution.
- Since:
- 0.17
-
-