SummaryStatistics implements StatisticalSummary, Serializable { public StatisticalSummary getSummary() { return new StatisticalSummaryValues(getMean(), getVariance(), getN(), getMax(), getMin(), getSum()); } SummaryStatistics();  SummaryStatistics(SummaryStatistics original); StatisticalSummary getSummary(); void addValue(double value); long getN(); double getSum(); double getSumsq(); double getMean(); double getStandardDeviation(); double getVariance(); double getPopulationVariance(); double getMax(); double getMin(); double getGeometricMean(); double getSumOfLogs(); double getSecondMoment(); @Override String toString(); void clear(); @Override boolean equals(Object object); @Override int hashCode(); StorelessUnivariateStatistic getSumImpl(); void setSumImpl(StorelessUnivariateStatistic sumImpl); StorelessUnivariateStatistic getSumsqImpl(); void setSumsqImpl(StorelessUnivariateStatistic sumsqImpl); StorelessUnivariateStatistic getMinImpl(); void setMinImpl(StorelessUnivariateStatistic minImpl); StorelessUnivariateStatistic getMaxImpl(); void setMaxImpl(StorelessUnivariateStatistic maxImpl); StorelessUnivariateStatistic getSumLogImpl(); void setSumLogImpl(StorelessUnivariateStatistic sumLogImpl); StorelessUnivariateStatistic getGeoMeanImpl(); void setGeoMeanImpl(StorelessUnivariateStatistic geoMeanImpl); StorelessUnivariateStatistic getMeanImpl(); void setMeanImpl(StorelessUnivariateStatistic meanImpl); StorelessUnivariateStatistic getVarianceImpl(); void setVarianceImpl(StorelessUnivariateStatistic varianceImpl); SummaryStatistics copy(); static void copy(SummaryStatistics source, SummaryStatistics dest);  }
@Test public void testGetSummary() { SummaryStatistics u = createSummaryStatistics(); StatisticalSummary summary = u.getSummary(); verifySummary(u, summary); u.addValue(1d); summary = u.getSummary(); verifySummary(u, summary); u.addValue(2d); summary = u.getSummary(); verifySummary(u, summary); u.addValue(2d); summary = u.getSummary(); verifySummary(u, summary); }