Class HistogramBucketCountFormatters

    • Method Detail

      • percentFormatter

        public static BiFunction<Long,​Long,​String> percentFormatter​(NumberFormat percentFormat)
        Make a BiFunction that can be used to format histogram bucket count values as a percentage of the total number counted by the histogram.

        If you don't need to configure the default percentage formatter, you can use the percentFormatter(Locale) version of this method instead.

        Parameters:
        percentFormat - The localized formatter that will format a number between 0.0 and 1.0 as a percentage.
        Returns:
        A BiFunction wrapping the provided percentFormat.
      • percentFormatter

        public static BiFunction<Long,​Long,​String> percentFormatter​(Locale formatLocale)
        Make a BiFunction that can be used to format histogram bucket count values as a percentage of the total number counted by the histogram.

        This method obtains the default percentage formatter for a Locale. If you need to configure the percentage formatter, you can use the percentFormatter(NumberFormat) version of this method instead.

        Parameters:
        formatLocale - The locale to use when obtaining a default percentage NumberFormat.
        Returns:
        A BiFunction wrapping the default percent format for the specified Locale.