Class Counter

    • Field Detail

      • count

        protected long count
        count represents the value of the counter.
      • n

        protected long n
        n represents the number of measurements.
      • description

        protected String description
        description refers to the title of this 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.
        Specified by:
        getCount in interface CounterInterface
        Returns:
        long; the counter value
      • getN

        public long getN()
        Returns the current number of observations.
        Specified by:
        getN in interface CounterInterface
        Returns:
        long; the number of observations
      • ingest

        public long ingest​(long value)
        Process one observed value.
        Specified by:
        ingest in interface CounterInterface
        Parameters:
        value - long; the value to process
        Returns:
        long; the value
      • getDescription

        public String getDescription()
        Returns the description of the counter.
        Specified by:
        getDescription in interface CounterInterface
        Returns:
        String; the description