Class Histogram

    • Constructor Summary

      Constructors 
      Constructor Description
      Histogram​(Reservoir reservoir)
      Creates a new Histogram with the given reservoir.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getCount()
      Returns the number of values recorded.
      Snapshot getSnapshot()
      Returns a snapshot of the values.
      void update​(int value)
      Adds a recorded value.
      void update​(long value)
      Adds a recorded value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Histogram

        public Histogram​(Reservoir reservoir)
        Creates a new Histogram with the given reservoir.
        Parameters:
        reservoir - the reservoir to create a histogram from
    • Method Detail

      • update

        public void update​(int value)
        Adds a recorded value.
        Parameters:
        value - the length of the value
      • update

        public void update​(long value)
        Adds a recorded value.
        Parameters:
        value - the length of the value
      • getCount

        public long getCount()
        Returns the number of values recorded.
        Specified by:
        getCount in interface Counting
        Returns:
        the number of values recorded
      • getSnapshot

        public Snapshot getSnapshot()
        Description copied from interface: Sampling
        Returns a snapshot of the values.
        Specified by:
        getSnapshot in interface Sampling
        Returns:
        a snapshot of the values