## org.apache.commons.math.stat.descriptive
Class AggregateSummaryStatistics.AggregatingSummaryStatistics

    java.lang.Object
      org.apache.commons.math.stat.descriptive.SummaryStatistics
          org.apache.commons.math.stat.descriptive.AggregateSummaryStatistics.AggregatingSummaryStatistics

All Implemented Interfaces:
  Serializable, StatisticalSummary

Enclosing class:
  AggregateSummaryStatistics

    private static class AggregateSummaryStatistics.AggregatingSummaryStatistics

extends SummaryStatistics

A SummaryStatistics that also forwards all values added to it to a second `SummaryStatistics` for aggregation.

Since:
  2.0

Field Summary
`private SummaryStatistics` `aggregateStatistics` An additional SummaryStatistics into which values added to these statistics (and possibly others) are aggregated
`private static long` `serialVersionUID` The serialization version of this class

Fields inherited from class org.apache.commons.math.stat.descriptive.SummaryStatistics
`geoMean, max, mean, min, n, secondMoment, sum, sumLog, sumsq, variance`

Constructor Summary
`AggregateSummaryStatistics.AggregatingSummaryStatistics(SummaryStatistics aggregateStatistics)` Initializes a new AggregatingSummaryStatistics with the specified aggregate statistics object

Method Summary
`void` `addValue(double value)` Add a value to the data
`boolean` `equals(Object object)` Returns true iff `object` is a `SummaryStatistics` instance and all statistics have the same values as this.
`int` `hashCode()` Returns hash code based on values of statistics

Methods inherited from class org.apache.commons.math.stat.descriptive.SummaryStatistics
`clear, copy, copy, getGeoMeanImpl, getGeometricMean, getMax, getMaxImpl, getMean, getMeanImpl, getMin, getMinImpl, getN, getSecondMoment, getStandardDeviation, getSum, getSumImpl, getSumLogImpl, getSummary, getSumOfLogs, getSumsq, getSumsqImpl, getVariance, getVarianceImpl, setGeoMeanImpl, setMaxImpl, setMeanImpl, setMinImpl, setSumImpl, setSumLogImpl, setSumsqImpl, setVarianceImpl, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### serialVersionUID

    private static final long serialVersionUID

  The serialization version of this class

  See Also:
    Constant Field Values

### aggregateStatistics

    private final SummaryStatistics aggregateStatistics

  An additional SummaryStatistics into which values added to these statistics (and possibly others) are aggregated

Constructor Detail

### AggregateSummaryStatistics.AggregatingSummaryStatistics

    public AggregateSummaryStatistics.AggregatingSummaryStatistics(SummaryStatistics aggregateStatistics)

  Initializes a new AggregatingSummaryStatistics with the specified aggregate statistics object

  Parameters:
    `aggregateStatistics` - a `SummaryStatistics` into which values added to this statistics object should be aggregated

Method Detail

### addValue

    public void addValue(double value)

  Add a value to the data. This version adds the provided value to the configured aggregate after adding it to these statistics.

  Overrides:
    `addValue` in class `SummaryStatistics`
  Parameters:
    `value` - the value to add
  See Also:
    `SummaryStatistics.addValue(double)`

### equals

    public boolean equals(Object object)

  Returns true iff `object` is a `SummaryStatistics` instance and all statistics have the same values as this.

  Overrides:
    `equals` in class `SummaryStatistics`
  Parameters:
    `object` - the object to test equality against.
  Returns:
    true if object equals this

### hashCode

    public int hashCode()

  Returns hash code based on values of statistics

  Overrides:
    `hashCode` in class `SummaryStatistics`
  Returns:
    hash code

Copyright (c) 2003-2013 Apache Software Foundation