Class AbstractStorelessUnivariateStatistic

    • Constructor Detail

      • AbstractStorelessUnivariateStatistic

        public AbstractStorelessUnivariateStatistic()
        Empty constructor.

        This constructor is not strictly necessary, but it prevents spurious javadoc warnings with JDK 18 and later.

        Since:
        3.0
    • Method Detail

      • getResult

        public abstract double getResult()
        Returns the current value of the Statistic.
        Specified by:
        getResult in interface StorelessUnivariateStatistic
        Returns:
        value of the statistic, Double.NaN if it has been cleared or just instantiated.
      • increment

        public abstract void increment​(double d)
        Updates the internal state of the statistic to reflect the addition of the new value.
        Specified by:
        increment in interface StorelessUnivariateStatistic
        Parameters:
        d - the new value.
      • equals

        public boolean equals​(Object object)
        Returns true iff object is the same type of StorelessUnivariateStatistic (the object's class equals this instance) returning the same values as this for getResult() and getN().
        Overrides:
        equals in class Object
        Parameters:
        object - object to test equality against.
        Returns:
        true if object returns the same value as this
      • hashCode

        public int hashCode()
        Returns hash code based on getResult() and getN().
        Overrides:
        hashCode in class Object
        Returns:
        hash code