private static void setBucketCountsAndExemplars(
      List<Bucket> buckets, Distribution.Builder builder) {
    // The first bucket (underflow bucket) should always be 0 count because the Metrics first bucket
    // is [0, first_bound) but StackDriver distribution consists of an underflow bucket (number 0).
    builder.addBucketCounts(0L);
    for (Bucket bucket : buckets) {
      builder.addBucketCounts(bucket.getCount());
      @javax.annotation.Nullable
      io.opencensus.metrics.data.Exemplar exemplar = bucket.getExemplar();
      if (exemplar != null) {
        builder.addExemplars(toProtoExemplar(exemplar));
      }
    }
  }
private static void setBucketCountsAndExemplars ( List < Bucket > buckets , Distribution . Builder builder ) { builder . addBucketCounts ( 0L ) ; for ( Bucket bucket : buckets ) { builder . addBucketCounts ( bucket . getCount ( ) ) ; @ javax . annotation . Nullable io . opencensus . metrics . data . Exemplar exemplar = bucket . getExemplar ( ) ; if ( exemplar != null ) { builder . addExemplars ( toProtoExemplar ( exemplar ) ) ; } } }
them to the builder.