DescriptiveStatistics implements StatisticalSummary, Serializable { public DescriptiveStatistics copy() { DescriptiveStatistics result = new DescriptiveStatistics(); copy(this, result); return result; } DescriptiveStatistics();  DescriptiveStatistics(int window);  DescriptiveStatistics(double[] initialDoubleArray);  DescriptiveStatistics(DescriptiveStatistics original); void addValue(double v); void removeMostRecentValue(); double replaceMostRecentValue(double v); double getMean(); double getGeometricMean(); double getVariance(); double getPopulationVariance(); double getStandardDeviation(); double getSkewness(); double getKurtosis(); double getMax(); double getMin(); long getN(); double getSum(); double getSumsq(); void clear(); int getWindowSize(); void setWindowSize(int windowSize); double[] getValues(); double[] getSortedValues(); double getElement(int index); double getPercentile(double p); @Override String toString(); double apply(UnivariateStatistic stat); synchronized UnivariateStatistic getMeanImpl(); synchronized void setMeanImpl(UnivariateStatistic meanImpl); synchronized UnivariateStatistic getGeometricMeanImpl(); synchronized void setGeometricMeanImpl(
            UnivariateStatistic geometricMeanImpl); synchronized UnivariateStatistic getKurtosisImpl(); synchronized void setKurtosisImpl(UnivariateStatistic kurtosisImpl); synchronized UnivariateStatistic getMaxImpl(); synchronized void setMaxImpl(UnivariateStatistic maxImpl); synchronized UnivariateStatistic getMinImpl(); synchronized void setMinImpl(UnivariateStatistic minImpl); synchronized UnivariateStatistic getPercentileImpl(); synchronized void setPercentileImpl(UnivariateStatistic percentileImpl); synchronized UnivariateStatistic getSkewnessImpl(); synchronized void setSkewnessImpl(
            UnivariateStatistic skewnessImpl); synchronized UnivariateStatistic getVarianceImpl(); synchronized void setVarianceImpl(
            UnivariateStatistic varianceImpl); synchronized UnivariateStatistic getSumsqImpl(); synchronized void setSumsqImpl(UnivariateStatistic sumsqImpl); synchronized UnivariateStatistic getSumImpl(); synchronized void setSumImpl(UnivariateStatistic sumImpl); DescriptiveStatistics copy(); static void copy(DescriptiveStatistics source, DescriptiveStatistics dest); static final int INFINITE_WINDOW; }
@Test public void testCopy() { DescriptiveStatistics stats = createDescriptiveStatistics(); stats.addValue(1); stats.addValue(3); DescriptiveStatistics copy = new DescriptiveStatistics(stats); Assert.assertEquals(2, copy.getMean(), 1E-10); stats.setMeanImpl(new deepMean()); copy = stats.copy(); Assert.assertEquals(42, copy.getMean(), 1E-10); }