Class Statistics.Item

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Statistics.Item>
    Enclosing class:
    Statistics

    public static class Statistics.Item
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Comparable<Statistics.Item>
    This class represents a single statistics item with name, min/max/avg value.
    See Also:
    Serialized Form
    • Constructor Detail

      • Item

        public Item​(java.lang.String name)
        Create a new sample.
        Parameters:
        name - the item name
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the sample name.
        Returns:
        the name
      • getMinimum

        public long getMinimum()
        Returns the minimum value.
        Returns:
        the minimum value
      • getMaximum

        public long getMaximum()
        Returns the maximum value.
        Returns:
        the maximum value
      • getAverage

        public long getAverage()
        Returns the average value.
        Returns:
        the average value
      • getAccumulator

        public long getAccumulator()
      • getSampleCount

        public int getSampleCount()
      • addSample

        public void addSample​(long value)
        Adds a new sample to this item.
        Parameters:
        value - the value
      • merge

        protected void merge​(Statistics.Item otherItem)
        Merges this item with another.
        Parameters:
        otherItem - the other item
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object