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.
  • 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 class Distribution.BucketOptions
      Parameters:
      explicitFunction - the function that should be applied if the BucketOptions has type ExplicitOptions.
      defaultFunction - the function that should be applied if the BucketOptions has a type that was added after this match method was added to the API. See Functions 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(List<Double> bucketBoundaries)
      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(List<Double> bucketBoundaries)
    • getBucketBoundaries

      public abstract List<Double> getBucketBoundaries()
      Returns the bucket boundaries of this distribution.
      Returns:
      the bucket boundaries of this distribution.
      Since:
      0.17