Class HistogramFormatter<T>

  • Type Parameters:
    T - The type of value the histogram counted.

    @Immutable
    public class HistogramFormatter<T>
    extends Object
    Format Histogram contents for a text display. The formatted output consists of a vertical list of labeled histogram buckets, with horizontal bar graphs showing the count in each bucket, followed by a percentage that represents the number of items counted in this bucket as a fraction of all items counted by this histogram.

    Example:

         <= 1 ******                                                        4%
         <= 2 *********************                                        15%
         <= 4 ************************************************************ 43%
         <= 8 ************************************************             34%
         >  8 *****                                                         4%
     
    See Also:
    BucketingSystem
    • Constructor Detail

      • HistogramFormatter

        public HistogramFormatter​(HistogramFormat<T> format)
        Create a HistogramFormatter that formats values according to the settings in the format parameter.
        Parameters:
        format - A HistogramFormat that describes how the formatted histogram should look.