@ Override public void aggregate ( T value ) { if ( value == null ) { nullCount ++ ; } else if ( isNan ( value ) ) { nanCount ++ ; } else if ( isInfinite ( value ) ) { infinityCount ++ ; } else { nonMissingCount ++ ; min . aggregate ( value ) ; max . aggregate ( value ) ; sum . aggregate ( value ) ; double doubleValue = value . doubleValue ( ) ; double delta = doubleValue - mean . value ( ) ; mean = mean . add ( delta / nonMissingCount ) ; m2 = m2 . add ( delta * ( doubleValue - mean . value ( ) ) ) ; } }
Add a value to the current aggregation .