Class Counter

    • Constructor Detail

      • Counter

        public Counter​(String description)
        Constructs a new Counter.
        Parameters:
        description - String; the description for this counter
    • Method Detail

      • getCount

        public long getCount()
        Returns the current counter value.
        Returns:
        long; the counter value
      • getN

        public long getN()
        Return the current number of observations.
        Specified by:
        getN in interface Statistic
        Returns:
        long; the number of observations
      • register

        public long register​(long value)
        Process one observed value.
        Parameters:
        value - long; the value to process
        Returns:
        long; the value
      • initialize

        public void initialize()
        Initialize the counter.
        Specified by:
        initialize in interface Statistic
      • getDescription

        public String getDescription()
        Returns the description of the statistic.
        Specified by:
        getDescription in interface Statistic
        Returns:
        String; the description of the statistic
      • reportHeader

        public static String reportHeader()
        Return a string representing a header for a textual table with a monospaced font that can contain multiple statistics.
        Returns:
        String; header for the textual table.
      • reportLine

        public String reportLine()
        Return a string representing a line with important statistics values for this statistic, for a textual table with a monospaced font that can contain multiple statistics.
        Specified by:
        reportLine in interface Statistic
        Returns:
        String; line with most important values of the statistic
      • reportFooter

        public static String reportFooter()
        Return a string representing a footer for a textual table with a monospaced font that can contain multiple statistics.
        Returns:
        String; footer for the textual table